diff --git a/lib/gds_api/publishing_api.rb b/lib/gds_api/publishing_api.rb index 7fa460b8..e7c71a0c 100644 --- a/lib/gds_api/publishing_api.rb +++ b/lib/gds_api/publishing_api.rb @@ -562,9 +562,9 @@ def get_schema(schema_name) # # @param query [String] # - # @return [Hash] A response with the result of the GraphQL query. + # @return [GdsApi::Response] 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 diff --git a/test/test_helpers/publishing_api_test.rb b/test/test_helpers/publishing_api_test.rb index 68085a7f..bcbb7a9e 100644 --- a/test/test_helpers/publishing_api_test.rb +++ b/test/test_helpers/publishing_api_test.rb @@ -632,7 +632,7 @@ assert_equal( stubbed_response.to_json, - api_response.to_json, + api_response.raw_response_body, ) end end