lib/graphql_client/base.rb in graphql_client-0.3.3 vs lib/graphql_client/base.rb in graphql_client-0.4.1
- old
+ new
@@ -31,11 +31,15 @@
response = adapter.request(query.to_query, operation_name: operation_name, variables: variables)
GraphObject.new(data: response.data, query: query)
end
def raw_query(query_string, operation_name: nil, variables: {})
+ raw_query_with_extensions(query_string, operation_name: operation_name, variables: variables)[0]
+ end
+
+ def raw_query_with_extensions(query_string, operation_name: nil, variables: {})
response = adapter.request(query_string, operation_name: operation_name, variables: variables)
- ResponseObject.new(response.data)
+ [ResponseObject.new(response.data), ResponseObject.new(response.extensions)]
end
private
def load_schema(schema)