summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2019-06-13 07:37:33 +0000
committerPhil Hughes <me@iamphill.com>2019-06-13 07:37:33 +0000
commit8bf01e2b2e135daff26d2a6dffb39ff56f0faec4 (patch)
tree11dca895df161847b5c3deb8efba90a5cba4a879
parente5d0b92300f3a032cb917a823a910cb1f2c68fba (diff)
parent0224aa4279bc44037249da250678d3155d22592e (diff)
downloadgitlab-ce-8bf01e2b2e135daff26d2a6dffb39ff56f0faec4.tar.gz
Merge branch 'ntepluhina-master-patch-46554' into 'master'
Added naming convention for .graphql files See merge request gitlab-org/gitlab-ce!29558
-rw-r--r--doc/development/fe_guide/graphql.md6
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