lib/ecoportal/api/graphql/logic/base_query.rb in ecoportal-api-graphql-0.3.11 vs lib/ecoportal/api/graphql/logic/base_query.rb in ecoportal-api-graphql-0.3.12
- old
+ new
@@ -76,14 +76,14 @@
def basic_block
raise "This method should be implemented in the child class #{self.class}"
end
- def graphql_query(path: self.path, **kargs, &block)
+ def graphql_query(path: self.path, raw_response: {}, **kargs, &block)
default_params = self.class.param_defaults.dup
query_params = self.class.slice_params(default_params.merge(kargs))
request(*path) do
- client.query(query_params, &block)
+ raw_response[:data] = client.query(query_params, &block)
end
rescue Faraday::ParsingError, Graphlient::Errors::GraphQLError => e
puts "Internal Error with these params:"
pp kargs
pp block