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
03a5f330
Commit
03a5f330
authored
Apr 20, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change `queries` to `fields_of(type_name)`
This makes it completely explicit what the 'queries' are in this case.
parent
3adfa65f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
lib/gitlab/graphql/docs/helper.rb
lib/gitlab/graphql/docs/helper.rb
+2
-3
lib/gitlab/graphql/docs/templates/default.md.haml
lib/gitlab/graphql/docs/templates/default.md.haml
+2
-2
No files found.
lib/gitlab/graphql/docs/helper.rb
View file @
03a5f330
...
...
@@ -143,10 +143,9 @@ module Gitlab
graphql_interface_types
.
map
{
|
t
|
t
.
merge
(
fields:
t
[
:fields
]
+
t
[
:connections
])
}
end
# 'queries' are the fields of the Query type
def
queries
def
fields_of
(
type_name
)
graphql_operation_types
.
find
{
|
type
|
type
[
:name
]
==
'Query'
}
.
find
{
|
type
|
type
[
:name
]
==
type_name
}
.
values_at
(
:fields
,
:connections
)
.
flatten
.
then
{
|
fields
|
sorted_by_name
(
fields
)
}
...
...
lib/gitlab/graphql/docs/templates/default.md.haml
View file @
03a5f330
...
...
@@ -26,8 +26,8 @@
The `Query` type contains the API's top-level entry points for all executable queries.
\
-
queries
.
each
do
|
query
|
=
render_full_field
(
query
,
heading_level:
3
,
owner:
'Query'
)
-
fields_of
(
'Query'
).
each
do
|
field
|
=
render_full_field
(
field
,
heading_level:
3
,
owner:
'Query'
)
\
:plain
...
...
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