Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-20 21:09:31 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-20 21:09:31 +0300
commitae4ef81757bdd2c984777d8f0b2c275bbcb4b17d (patch)
tree1ac23c80190bafb47a1f5a6f1aae9da91d35d9dc /app/graphql
parent194b499aa8e26df26ff70a1e1ce0396587bd5243 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/graphql')
-rw-r--r--app/graphql/types/base_field.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/app/graphql/types/base_field.rb b/app/graphql/types/base_field.rb
index 148675e9d9e..7e9d6392705 100644
--- a/app/graphql/types/base_field.rb
+++ b/app/graphql/types/base_field.rb
@@ -90,8 +90,6 @@ module Types
# proc because we set complexity depending on arguments and number of
# items which can be loaded.
proc do |ctx, args, child_complexity|
- next base_complexity unless resolver_complexity_enabled?(ctx)
-
# Resolvers may add extra complexity depending on used arguments
complexity = child_complexity + self.resolver&.try(:resolver_complexity, args, child_complexity: child_complexity).to_i
complexity += 1 if calls_gitaly?
@@ -101,10 +99,6 @@ module Types
end
end
- def resolver_complexity_enabled?(ctx)
- ctx.fetch(:graphql_resolver_complexity_flag) { |key| ctx[key] = Feature.enabled?(:graphql_resolver_complexity) }
- end
-
def connection_complexity_multiplier(ctx, args)
# Resolvers may add extra complexity depending on number of items being loaded.
field_defn = to_graphql