summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBrett Walker <bwalker@gitlab.com>2019-08-26 17:43:38 +0000
committerMayra Cabrera <mcabrera@gitlab.com>2019-08-26 17:43:38 +0000
commitbdd5b5b69533b8035d0a03a1d4c9de38ba3da189 (patch)
treeedd9d288399eb73d196e631e9be93d2f3de98670 /lib
parent783670c4cd980ee9394b8dd639e553cfaddf19d1 (diff)
downloadgitlab-ce-bdd5b5b69533b8035d0a03a1d4c9de38ba3da189.tar.gz
Replace echo function with a resolver
The `GraphQL::Function` has been deprecated in favor of resolvers.
Diffstat (limited to 'lib')
-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