Skip to content
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

GraphQLError is unhashable #34

Closed
andrew-humu opened this issue May 30, 2019 · 1 comment · Fixed by #35
Closed

GraphQLError is unhashable #34

andrew-humu opened this issue May 30, 2019 · 1 comment · Fixed by #35
Assignees
Labels
bug Something isn't working

Comments

@andrew-humu
Copy link
Contributor

It seems that the logging library in python assumes that exceptions are hashable, in order to be logged. It'd be great if we could treat GraphQL errors the same way as other builtin exceptions.

See also, a similar issue in the schematics project:

schematics/schematics#452

@Cito Cito self-assigned this May 31, 2019
@Cito Cito added the bug Something isn't working label May 31, 2019
@Cito
Copy link
Member

Cito commented May 31, 2019

Thank you for reporting this. The problem is that GraphQLError implements __eq__ which causes it to lose the default hash capability as Exception. I agree this should be fixed (see #35 for implementation details).

@Cito Cito closed this as completed in #35 May 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants