graphql-client
graphql-client copied to clipboard
Support for non-standards compliant GraphQL APIs
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.
Implement IGraphQLJsonSerializer.DeserializeFromUtf8StreamAsync and configure your custom serializer returning subclass of GraphQLResponse<TResponse> with all additinal data you need?