-
-
Notifications
You must be signed in to change notification settings - Fork 140
ExecutionResult.formatted does not format errors #129
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
Comments
Thanks for reporting. I agree that it would be reasonable to return a list of formatted errors here. Will be fixed. |
Wouldn't any tracebacks be attached to the |
Not in the formatted result. According to the spec, the formatted error only contains message, locations, path and extensions. |
Right, sorry let me rephrase. If |
Don't worry. The execution results and errors are not automatically formatted. We're only talking about the case when you access the |
Co-authored-by: Mike Lorenzana <[email protected]>
When I call formatted on an ExecutionResult, the errors portion of the dict is not formatted and instead returns a list of GraphQLErrors. GraphQLError is not serializable, but it does have a formatted property which is, why is formatted not called on the list of GraphQLErrors?
As a work around, I have to call formatted on my ExecutionResult and then rebuild the dict and format the errors:
Ideally ExecutionResult.formatted would perform this error formatting for me.
Environment:
python 3.8
graphql-core 3.1.4
The text was updated successfully, but these errors were encountered: