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: willAddGraphQLTypeToSchema needs annotations from field #1437

Merged
merged 4 commits into from
May 4, 2022

Conversation

bherrmann2
Copy link
Contributor

📝 Description

When using the @GraphQLUnion as a meta annotation, the KType is Any when the type for the field is being generated by reflection. The correct type is actually the annotation on the field with the @GraphQLUnion meta annotation. In this case, the type passed to the hook needs to be that annotation since that is the class with other annotations on it, which could be needed by the hook.

🔗 Related Issues

@bherrmann2 bherrmann2 marked this pull request as ready for review May 4, 2022 17:24
@tapaderster tapaderster merged commit 8da7aed into ExpediaGroup:master May 4, 2022
@bherrmann2 bherrmann2 deleted the fix-union-annotation branch May 4, 2022 19:36
@dariuszkuc dariuszkuc added changes: minor Changes require a minor version module: generator Issue affects the schema generator and federation code changes: patch Changes require a patch version and removed changes: minor Changes require a minor version labels May 4, 2022
samuelAndalon added a commit that referenced this pull request May 9, 2022
* feat: support directives with the union annotation (#1424)

* feat: support directives with the union annotation

* CR comment

* fix: willAddGraphQLTypeToSchema needs annotations from field (#1437)

* feat: use withDirective

* feat: update tests

Co-authored-by: bherrmann2 <bherrmann@expedia.com>
Co-authored-by: samvazquez <samvazquez@expedia.com>
dariuszkuc pushed a commit to dariuszkuc/graphql-kotlin that referenced this pull request Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changes: patch Changes require a patch version module: generator Issue affects the schema generator and federation code
Development

Successfully merging this pull request may close these issues.

4 participants