Skip to content

fix: use enum value in GraphQLEnumValueDefinition #2112

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tKe
Copy link
Contributor

@tKe tKe commented May 12, 2025

📝 Description

Attempting to output an enum value with a custom @GraphQLName annotation will currently result in something like:

SerializationError{path=[enumOutputs, 3], exception=graphql.schema.CoercingSerializeException: Invalid input for enum 'MyTestEnum'. Unknown value 'FOUR'}

This PR changes the GraphQLEnumValueDefinition value to be the enum entry itself rather than the graphql name, which allows graphql-java to correctly resolve the name from the definition.

🔗 Related Issues

@tKe tKe force-pushed the fix/enum-value-in-GraphQLEnumValueDefinition branch from 4f07846 to 10cc3ea Compare May 12, 2025 15:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant