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

Support leading pipe in union definition #654

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

Conversation

camdencheek
Copy link

The GraphQL spec supports a leading pipe operator for union type definitions, but the parser in graphql-go fails on schemas defined that way.

Notably, in prettier has started using this format in v3, so many GraphQL schemas formatted by prettier will fail when used by this library.

This PR adds support for a leading pipe in union types. I added a unit test. I looked into why this wasn't captured by the validation tests that are generated from graphql-js, and it seems that this language feature isn't represented in the validation tests.

@camdencheek camdencheek marked this pull request as ready for review October 19, 2024 23:06
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.

1 participant