Added naming convention for .graphql files

This commit is contained in:
Natalia Tepluhina 2019-06-13 07:37:33 +00:00 committed by Phil Hughes
parent e5d0b92300
commit 0224aa4279
1 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,12 @@ To save query compilation at runtime, webpack can directly import `.graphql`
files. This allows webpack to preprocess the query at compile time instead
of the client doing compilation of queries.
To distinguish queries from mutations and fragments, the following naming convention is recommended:
- `allUsers.query.graphql` for queries;
- `addUser.mutation.graphql` for mutations;
- `basicUser.fragment.graphql` for fragments.
## Usage in Vue
To use Vue Apollo, import the [Vue Apollo][vue-apollo] plugin as well