diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 09:09:54 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-08 09:09:54 +0300 |
commit | f6cdec670b9b757fc2225a2c6627ab79765e5b8a (patch) | |
tree | 7a1fde030f117b69332d01b22deefd1c81fff458 /spec/support/helpers | |
parent | e2ee1eec50aa8df8543d7ecc585ec0ba5ee544ac (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/helpers')
-rw-r--r-- | spec/support/helpers/graphql_helpers.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/support/helpers/graphql_helpers.rb b/spec/support/helpers/graphql_helpers.rb index 74582df6cd9..fc543186b08 100644 --- a/spec/support/helpers/graphql_helpers.rb +++ b/spec/support/helpers/graphql_helpers.rb @@ -149,7 +149,7 @@ module GraphqlHelpers FIELDS end - def all_graphql_fields_for(class_name, parent_types = Set.new, max_depth: 3) + def all_graphql_fields_for(class_name, parent_types = Set.new, max_depth: 3, excluded: []) # pulling _all_ fields can generate a _huge_ query (like complexity 180,000), # and significantly increase spec runtime. so limit the depth by default return if max_depth <= 0 @@ -165,6 +165,7 @@ module GraphqlHelpers type.fields.map do |name, field| # We can't guess arguments, so skip fields that require them next if required_arguments?(field) + next if excluded.include?(name) singular_field_type = field_type(field) |