Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 03:06:16 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-16 03:06:16 +0300
commitc920712fab6abdc37de9444e6bbcd170c295b21a (patch)
tree0334235524cfd5d98080cf0b5a289eed6c1fae55 /doc/development/rake_tasks.md
parent0ff031c7f4e2c7fe1b671b30fef569eb3fbea942 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/development/rake_tasks.md')
-rw-r--r--doc/development/rake_tasks.md23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/development/rake_tasks.md b/doc/development/rake_tasks.md
index 20604cce9c6..ea4acf7083a 100644
--- a/doc/development/rake_tasks.md
+++ b/doc/development/rake_tasks.md
@@ -220,3 +220,26 @@ bundle exec rake db:obsolete_ignored_columns
```
Feel free to remove their definitions from their `ignored_columns` definitions.
+
+## Update GraphQL Documentation
+
+To generate GraphQL documentation based on the GitLab schema, run:
+
+```shell
+bundle exec rake gitlab:graphql:compile_docs
+```
+
+In its current state, the rake task:
+
+- Generates output for GraphQL objects.
+- Places the output at `docs/api/graphql/reference/index.md`.
+
+This uses some features from `graphql-docs` gem like its schema parser and helper methods.
+The docs generator code comes from our side giving us more flexibility, like using Haml templates and generating Markdown files.
+
+To edit the template used, please take a look at `lib/gitlab/graphql/docs/templates/default.md.haml`.
+The actual renderer is at `Gitlab::Graphql::Docs::Renderer`.
+
+`@parsed_schema` is an instance variable that the `graphql-docs` gem expects to have available.
+`Gitlab::Graphql::Docs::Helper` defines the `object` method we currently use. This is also where you should implement any
+new methods for new types you'd like to display.