graphql-client icon indicating copy to clipboard operation
graphql-client copied to clipboard

Support for non-standards compliant GraphQL APIs

Open poslogix opened this issue 3 years ago • 1 comments
trafficstars

I'm currently trying to integrate with a GraphQL API that was written before the standards, using the GraphQL.Client nuget package.

The host is returning an additional property 'validation' in the error response e.g.: { "errors": [ { "message": "validation", "locations": [ { "line": 2, "column": 29 } ], "validation": { "currency": [ "This field is required" ] }, "customer_facing": false } ], "data": { "createBalanceAdjustment": null } }

I've had a good look around the docs but can't seem to find a way to get access to anything under 'validation', or simply get access to the raw response JSON.

Any help would be greatly appreciated. Also thanks @Shane32 for pointing me in the right direction to ask the question.

poslogix avatar Nov 08 '22 16:11 poslogix

Implement IGraphQLJsonSerializer.DeserializeFromUtf8StreamAsync and configure your custom serializer returning subclass of GraphQLResponse<TResponse> with all additinal data you need?

sungam3r avatar Nov 09 '22 11:11 sungam3r