Description
Sometimes I make graphQL requests using graphQL client but the server returns something like this:
"GraphQL.Validation.InvalidVariableError: Variable '$filter' is invalid. Unrecognized input fields 'operation' for type 'FilterGQLInputType'.\n at GraphQL.Validation.ValidationContext.<GetVariableValue>g__ParseValueObject|39_3(IInputObjectGraphType graphType, VariableDefinition variableDef, VariableName variableName, Object value, IVariableVisitor visitor) in /_/src/GraphQL/Validation/ValidationContext.cs:line 452\n at GraphQL.Validation.ValidationContext.<GetVariableValue>g__ParseValue|39_0(IGraphType type, VariableDefinition variableDef, VariableName variableName, Object value, IVariableVisitor visitor) in /_/src/GraphQL/Validation/ValidationContext.cs:line 297\n at GraphQL.Validation.ValidationContext.GetVariableValues(ISchema schema, VariableDefinitions variableDefinitions, Inputs inputs, IVariableVisitor visitor) in /_/src/GraphQL/Validation/ValidationContext.cs:line 231"
Obviously this won't be mapped or deserialized into any object and then graphQL throws an exception which is all good but I am unable to get the raw response all I get is the exception:
The JSON value could not be converted to GraphQL.GraphQLResponse1[ExtraEgypt.Models.Subsbase.CustomerQueryResponse]. Path: $ | LineNumber: 0 | BytePositionInLine: 895.
I would also like to get the original HTTP response (shown at the top) for logging purposes otherwise it becomes very difficult to understand what happened.