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

Fix classification type in GraphQLErrorExtensions #1802

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

kilink
Copy link
Member

@kilink kilink commented Jan 25, 2024

GraphQLErrorExtensions' classification property had a type of String, but in practice an ErrorClassification may be mapped to any JSON serializable type; this is actually the case in practice when using libraries such as graphql-java-extended-validation, which may return a Map for its ErrorClassification. Switch the type to Any, so that such responses can be deserialized, and add a simple test case.

Fixes #1146

GraphQLErrorExtensions' classification property had a type of String, but in practice an
ErrorClassification may be mapped to any JSON serializable type; this is actually
the case in practice when using libraries such as graphql-java-extended-validation, which
may return a Map for its ErrorClassification. Switch the type to Any, so that such
responses can be deserialized, and add a simple test case.
@kilink kilink merged commit 690878a into master Jan 25, 2024
3 checks passed
@kilink kilink deleted the error-classification-fix branch February 23, 2024 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants