class GraphQL::Schema::IntrospectionSystem::PerFieldProxyResolve
Public Class Methods
new(object_class:, inner_resolve:)
click to toggle source
# File lib/graphql/schema/introspection_system.rb, line 152 def initialize(object_class:, inner_resolve:) @object_class = object_class @inner_resolve = inner_resolve end
Public Instance Methods
call(obj, args, ctx)
click to toggle source
# File lib/graphql/schema/introspection_system.rb, line 157 def call(obj, args, ctx) query_ctx = ctx.query.context # Remove the QueryType wrapper if obj.is_a?(GraphQL::Schema::Object) obj = obj.object end wrapped_object = @object_class.authorized_new(obj, query_ctx) @inner_resolve.call(wrapped_object, args, ctx) end