Skip to content

Commit 20fa39d

Browse files
committed
Use a cached lookup for field resolution from SDL
1 parent 0c45b03 commit 20fa39d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/graphql/schema/build_from_definition.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ def build_fields(owner, field_definitions, type_resolver, default_resolve:)
523523

524524
def define_field_resolve_method(owner, method_name, field_name)
525525
owner.define_method(method_name) { |**args|
526-
field_instance = self.class.get_field(field_name)
526+
field_instance = context.types.field(owner, field_name)
527527
context.schema.definition_default_resolve.call(self.class, field_instance, object, args, context)
528528
}
529529
end

0 commit comments

Comments
 (0)