When handling the errors on field which is defined in an Interface, field.owner returns the interface module, instead of the real owner (the subclass of GraphQL::Schema::Object). Probably it should be changed to trace_data[:owner]?
def ensure_guarded(trace_data)
field = trace_data[:field]
guard_proc = find_guard_proc(field.owner, field)
return yield unless guard_proc
if guard_proc.call(trace_data[:object], args(trace_data), trace_data[:query].context)
yield
else
not_authorized.call(field.owner.graphql_definition, field.name.to_sym)
end
end
When handling the errors on field which is defined in an Interface,
field.owner
returns the interface module, instead of the real owner (the subclass of GraphQL::Schema::Object). Probably it should be changed totrace_data[:owner]
?