Skip to content

Consistently translate Python enumerations to values #198

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

Merged
merged 1 commit into from
Jul 19, 2019

Conversation

nickbruun
Copy link
Contributor

@nickbruun nickbruun commented Jul 19, 2018

First off, thank you very much for the hard work on this. It's very appreciated!

We use Python enumeration values as the internally represented value for our GraphQL enumerations for a number of reasons. The recent change of coercing Python enumeration values to their internal values before lookup in GraphQLEnumType.serialize means that 2.1.0 broke the ability to do this.

This should fix the issue by forcing the same value-ification in the lookup dictionary to make it consistent.

@nickbruun nickbruun changed the title Consistently translate Python enumerations to strings Consistently translate Python enumerations to values Jul 19, 2018
Copy link
Member

@Cito Cito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me.

@Cito Cito self-assigned this Jul 19, 2019
@Cito Cito removed the need review label Jul 19, 2019
@Cito Cito merged commit cf221fd into graphql-python:master Jul 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants