Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
277e64c8
Commit
277e64c8
authored
Oct 15, 2019
by
Mario de la Ossa
Committed by
Evan Read
Oct 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document gitlab:graphql:compile_docs
parent
5d760ac8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
doc/development/api_graphql_styleguide.md
doc/development/api_graphql_styleguide.md
+5
-0
doc/development/rake_tasks.md
doc/development/rake_tasks.md
+23
-0
No files found.
doc/development/api_graphql_styleguide.md
View file @
277e64c8
...
...
@@ -539,3 +539,8 @@ it 'returns a successful response' do
expect
(
graphql_mutation_response
(
:merge_request_set_wip
)[
'errors'
]).
to
be_empty
end
```
## Documentation
For information on generating GraphQL documentation, see
[
Rake tasks related to GraphQL
](
rake_tasks.md#update-graphql-documentation
)
.
doc/development/rake_tasks.md
View file @
277e64c8
...
...
@@ -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.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment