You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{
"errors": [
{
"message": "Variable \"$foo\" got invalid value { Number: \"0123456789\", SystemCode: \"BAZ\" }; Field fooNumber of required type String! was not provided."
},
{
"message": "Variable \"$foo\" got invalid value { Number: \"0123456789\", SystemCode: \"BAZ\" }; Field systemCode of required type FooSystemType! was not provided."
},
{
"message": "Variable \"$foo\" got invalid value { Number: \"0123456789\", SystemCode: \"BAZ\" }; Field \"Number\" is not defined by type FooNumber."
},
{
"message": "Variable \"$foo\" got invalid value { Number: \"0123456789\", SystemCode: \"BAZ\" }; Field \"SystemCode\" is not defined by type FooNumber. Did you mean systemCode?"
}
],
}
Currently the arguments are serilized using Newtonsoft.Json and therefore you should use [JsonProperty("fooNumber")] instead of [GraphQLFieldName("fooNumber")].
Thanks for the example @sahb1239. Can JsonProperty and GraphQLFieldName be used on the same property? I can imagine there might be scenarios where FooNumber is part of the query model. It's not a major issue for me at the moment but I would like to know if it does get solved in a future release.
Background
I'm trying to pass the variables
{ "foo": {"fooNumber": "0123456789", "systemCode": "BAZ"} }
to this queryWhat works
If I use a class that with parameters that are named identically it works.
Issue
However it does not work with a traditionally named class because parameter names are not transformed.
It generates an
SAHB.GraphQLClient.Exceptions.GraphQLHttpExecutorServerErrorStatusCodeException
because of a BadRequest.Generated Query
Query
Variables
Response
Query classes
The text was updated successfully, but these errors were encountered: