diff options
author | Natalia Tepluhina <ntepluhina@gitlab.com> | 2019-06-12 15:36:17 +0000 |
---|---|---|
committer | Natalia Tepluhina <ntepluhina@gitlab.com> | 2019-06-12 15:36:17 +0000 |
commit | 9aee0ddf99548c10b7613fde678efd6dd6942e91 (patch) | |
tree | 939ca51f65f2268736fdb643c69afa56151019a6 | |
parent | 0c6eedeb81254f832775846d6d19a502a88562f7 (diff) | |
download | gitlab-ce-ntepluhina-master-patch-46554.tar.gz |
Added naming convention for .graphql filesntepluhina-master-patch-46554
-rw-r--r-- | doc/development/fe_guide/graphql.md | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/doc/development/fe_guide/graphql.md b/doc/development/fe_guide/graphql.md index 8e06aa5d173..9fcd32fddfa 100644 --- a/doc/development/fe_guide/graphql.md +++ b/doc/development/fe_guide/graphql.md @@ -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 |