Skip to content

Commit

Permalink
Add some resolve_type
Browse files Browse the repository at this point in the history
  • Loading branch information
rmosolgo committed Dec 16, 2024
1 parent dcd9541 commit 2f9b1db
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/graphql/execution/interpreter/runtime.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,11 @@ def run_partial_eager
end
when "SCALAR", "ENUM"
parent_type = partial.parent_type
parent_object_proxy = parent_type.wrap(object, context)
# TODO what if not object type? Maybe returns a lazy here.
parent_object_type, object = resolve_type(parent_type, object)
parent_object_proxy = parent_object_type.wrap(object, context)
parent_object_proxy = schema.sync_lazy(parent_object_proxy)
@response = GraphQLResultHash.new(nil, parent_type, parent_object_proxy, nil, false, selections, false)
@response = GraphQLResultHash.new(nil, parent_object_type, parent_object_proxy, nil, false, selections, false)
field_node = partial.ast_nodes.first
result_name = field_node.alias || field_node.name
@dataloader.append_job do
Expand Down

0 comments on commit 2f9b1db

Please sign in to comment.