diff --git a/lib/graphql/client.rb b/lib/graphql/client.rb index 37bbe83..6fea76d 100644 --- a/lib/graphql/client.rb +++ b/lib/graphql/client.rb @@ -380,12 +380,11 @@ def query(definition, variables: {}, context: {}) error_payload = payload.merge(message: error["message"], error: error) ActiveSupport::Notifications.instrument("error.graphql", error_payload) end - Response.new( result, data: definition.new(data, Errors.new(errors, ["data"])), errors: Errors.new(errors), - extensions:, + extensions: extensions, full_response: execute.respond_to?("last_response") ? execute.last_response : nil ) end