Skip to content

Commit

Permalink
Return GraphQL response as GdsApi::Response
Browse files Browse the repository at this point in the history
This is instead of `Hash`.

In Government Frontend, we need some other information from the request
response (e.g. the cache control headers) which are not included when
the response is converted to a hash.

This is not a breaking change as the new object type accepts the same
methods as the hash.
  • Loading branch information
brucebolt committed Dec 2, 2024
1 parent f5c0bfc commit d0bd2e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/gds_api/publishing_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ def get_schema(schema_name)
#
# @return [Hash] A response with the result of the GraphQL query.
def graphql_query(query)
post_json("#{endpoint}/graphql", query:).to_hash
post_json("#{endpoint}/graphql", query:)
end

private
Expand Down

0 comments on commit d0bd2e5

Please sign in to comment.