We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When the graphql-api returns an error, it will also return a list in data. This will cause elm-gql to return Ok, when it instead should return Err.
data
Ok
Err
Here is an example query for Magento which will try create a user with erroneous data:
mutation createcustomer { createCustomerV2( input: { firstname: "a" lastname: "a" email: "a" password: "a" } ) { customer { email } } }
It will return:
{ "errors": [ { "message": "\"a\" is not a valid email address.", # ... } ], "data": { "createCustomerV2": null } }
The problem is at
elm-gql/src/GraphQL/Engine.elm
Line 759 in 25171c7
oneOf
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When the graphql-api returns an error, it will also return a list in
data
. This will cause elm-gql to returnOk
, when it instead should returnErr
.Here is an example query for Magento which will try create a user with erroneous data:
It will return:
The problem is at
elm-gql/src/GraphQL/Engine.elm
Line 759 in 25171c7
oneOf
fails to decode the first block, and instead returns the second block. This causes the function to returnOk
instead ofErr
.The text was updated successfully, but these errors were encountered: