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
e5337c7e
Commit
e5337c7e
authored
Jan 24, 2020
by
Luke Duncalfe
Committed by
Evan Read
Jan 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Alphabetize GraphQL API docs fields
https://gitlab.com/gitlab-org/gitlab/issues/198573
parent
be130b6e
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
354 additions
and
350 deletions
+354
-350
doc/api/graphql/reference/index.md
doc/api/graphql/reference/index.md
+349
-349
lib/gitlab/graphql/docs/helper.rb
lib/gitlab/graphql/docs/helper.rb
+4
-0
lib/gitlab/graphql/docs/templates/default.md.haml
lib/gitlab/graphql/docs/templates/default.md.haml
+1
-1
No files found.
doc/api/graphql/reference/index.md
View file @
e5337c7e
This diff is collapsed.
Click to expand it.
lib/gitlab/graphql/docs/helper.rb
View file @
e5337c7e
...
...
@@ -21,6 +21,10 @@ module Gitlab
MD
end
def
sorted_fields
(
fields
)
fields
.
sort_by
{
|
field
|
field
[
:name
]
}
end
# Some fields types are arrays of other types and are displayed
# on docs wrapped in square brackets, for example: [String!].
# This makes GitLab docs renderer thinks they are links so here
...
...
lib/gitlab/graphql/docs/templates/default.md.haml
View file @
e5337c7e
...
...
@@ -21,6 +21,6 @@ fields and methods on a model are available via GraphQL.
\
~ "| Name | Type | Description |"
~ "| --- | ---- | ---------- |"
-
type
[
:fields
]
.
each
do
|
field
|
-
sorted_fields
(
type
[
:fields
])
.
each
do
|
field
|
=
"| `
#{
field
[
:name
]
}
` |
#{
render_field_type
(
field
[
:type
][
:info
])
}
|
#{
field
[
:description
]
}
|"
\
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