-
-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
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
SourceLocation should be serialized as object #61
Comments
ktosiek
added a commit
to ktosiek/graphene-django
that referenced
this issue
Sep 15, 2019
Some of the tests show the problem described here: graphql-python/graphql-core#61
ktosiek
added a commit
to ktosiek/graphene-django
that referenced
this issue
Sep 16, 2019
Some of the tests show the problem described here: graphql-python/graphql-core#61
Good point. Yes, I think it makes totally sense to return locations as a list of dicts in |
This was referenced Sep 16, 2019
This is now included in v3.0.0b1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
SourceLocation
, as a NamedTuple, is serialized by json.dumps() to an array instead of an object. Graphql.js keepsSourceLocation
as and object, so it just works for them.Reproduction:
Expected result:
{"message": "test", "locations": [
{"line": 1, "column": 3}
], "path": null}
Actual result:
{"message": "test", "locations": [
[1, 3]
], "path": null}
Should
SourceLocation
be changed to something that serializes correctly? Or would it make more sense to convert it to dict informat_errors
?The text was updated successfully, but these errors were encountered: