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

Allow connection directive to be applied to Unions and Interfaces #1798

Merged
merged 2 commits into from
Jan 23, 2024

Conversation

kilink
Copy link
Member

@kilink kilink commented Jan 23, 2024

DgsPaginationTypeDefinitionRegistry generated a connection directive which could only be applied to Object types; update it to allow Union and Interfaces as well.

There were tests for this scenario but they didn't catch the problem because they never built a GraphQLSchema. To avoid such issues, switch all of the tests to fully build a GraphQLSchema.

Fixes #1317.

DgsPaginationTypeDefinitionRegistry generated a connection directive which could only be applied to
Object types; update it to allow Union and Interfaces as well.

There were tests for this scenario but they didn't catch the problem because they never built a GraphQLSchema.
To avoid such issues, switch all of the tests to fully build a GraphQLSchema.
Copy link
Contributor

@srinivasankavitha srinivasankavitha left a comment

Choose a reason for hiding this comment

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

Good catch! Thanks for the fixes.

@kilink kilink merged commit 32d65fd into master Jan 23, 2024
3 checks passed
@kilink kilink deleted the pagination-fix branch January 25, 2024 04:56
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.

bug: Using @connection on interface fails
2 participants