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:
authorBrett Walker <bwalker@gitlab.com>2019-08-26 20:43:38 +0300
committerMayra Cabrera <mcabrera@gitlab.com>2019-08-26 20:43:38 +0300
commitbdd5b5b69533b8035d0a03a1d4c9de38ba3da189 (patch)
treeedd9d288399eb73d196e631e9be93d2f3de98670 /lib/gitlab/graphql
parent783670c4cd980ee9394b8dd639e553cfaddf19d1 (diff)
Replace echo function with a resolver
The `GraphQL::Function` has been deprecated in favor of resolvers.
Diffstat (limited to 'lib/gitlab/graphql')
-rw-r--r--lib/gitlab/graphql/present/instrumentation.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/gitlab/graphql/present/instrumentation.rb b/lib/gitlab/graphql/present/instrumentation.rb
index ab03c40c22d..941a4f434a1 100644
--- a/lib/gitlab/graphql/present/instrumentation.rb
+++ b/lib/gitlab/graphql/present/instrumentation.rb
@@ -23,7 +23,9 @@ module Gitlab
end
presenter = presented_in.presenter_class.new(object, **context.to_h)
- wrapped = presented_type.class.new(presenter, context)
+
+ # we have to use the new `authorized_new` method, as `new` is protected
+ wrapped = presented_type.class.authorized_new(presenter, context)
old_resolver.call(wrapped, args, context)
end