diff options
Diffstat (limited to 'spec/support/graphql/field_selection.rb')
-rw-r--r-- | spec/support/graphql/field_selection.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/spec/support/graphql/field_selection.rb b/spec/support/graphql/field_selection.rb index e2a3334acac..00323c46d69 100644 --- a/spec/support/graphql/field_selection.rb +++ b/spec/support/graphql/field_selection.rb @@ -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 + return new if max_depth <= 0 || !type.kind.fields? new(type.fields.flat_map do |name, field| next [] if skip[name, field] |