-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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 defining empty types #630
Comments
From the current and draft specs
That issue has no merged PRs and people saying that it doesnt work in graphql-js Lets wait for graphql/graphql-spec#568. If you are championing this please have a read of the graphql spec contribution guidelines. I cant imagine much resistance to this, it should go through pretty quickly. |
Alright, makes sense |
Just as an addition if other users visit this issue: using |
@steebchen I still get an error:
gqlgen 0.11.3 |
Empty types should be allowed. I'm not sure if the GraphQL spec allows this, but I think it makes sense when you
extend
types.For example, when I have a complex schema and split my definitions into separate packages/files, I may want to do the following:
The exact error message is
modelgen: api/resolver/mutation/mutation.graphqls:1: expected at least one definition, found }
graphql-js also allows empty types.
The text was updated successfully, but these errors were encountered: