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
f865e83a
Commit
f865e83a
authored
Jan 27, 2021
by
Alex Kalderimis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use kind predicates
parent
59bcb7b0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
spec/support/graphql/field_selection.rb
spec/support/graphql/field_selection.rb
+1
-1
No files found.
spec/support/graphql/field_selection.rb
View file @
f865e83a
...
...
@@ -47,7 +47,7 @@ module Graphql
NO_SKIP
=
->
(
_name
,
_field
)
{
false
}
def
self
.
select_fields
(
type
,
skip
=
NO_SKIP
,
parent_types
=
Set
.
new
,
max_depth
=
3
)
return
new
if
max_depth
<=
0
||
!
type
.
respond_to?
(
:fields
)
# could be a union!
return
new
if
max_depth
<=
0
||
!
type
.
kind
.
fields?
new
(
type
.
fields
.
flat_map
do
|
name
,
field
|
next
[]
if
skip
[
name
,
field
]
...
...
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