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: schema extension without root fields should skip empty {} block #582

Merged

Conversation

dariuszkuc
Copy link
Member

@dariuszkuc dariuszkuc commented Jun 15, 2023

Per GraphQL spec

Schema extensions without additional operation type definitions must not be followed by a { (such as a query shorthand) to avoid parsing ambiguity.

Currently generated definition cannot be parsed by apollo-compiler.

extend schema @foo {
}

Per [GraphQL spec](https://spec.graphql.org/draft/#sec-Schema-Extension)

```
Schema extensions without additional operation type definitions must not be followed by a { (such as a query shorthand) to avoid parsing ambiguity.
```
Copy link
Member

@goto-bus-stop goto-bus-stop left a comment

Choose a reason for hiding this comment

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

super, thank you!

@goto-bus-stop goto-bus-stop merged commit 6a0b13f into apollographql:main Jun 16, 2023
8 checks passed
@dariuszkuc dariuszkuc deleted the encoder_schema_extension branch June 16, 2023 14:11
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.

None yet

2 participants