-
Notifications
You must be signed in to change notification settings - Fork 529
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
Add "Objects must define fields" schema validation #1167
Merged
benwilson512
merged 5 commits into
absinthe-graphql:master
from
maartenvanvliet:objects_must_define_fields
Sep 8, 2022
Merged
Add "Objects must define fields" schema validation #1167
benwilson512
merged 5 commits into
absinthe-graphql:master
from
maartenvanvliet:objects_must_define_fields
Sep 8, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
maartenvanvliet
force-pushed
the
objects_must_define_fields
branch
from
April 29, 2022 14:22
d651488
to
d6c57ad
Compare
benwilson512
approved these changes
May 3, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great thanks!
kdawgwilk
approved these changes
Aug 7, 2022
Hey @maartenvanvliet this is getting test failures on the CI now, can you investigate? |
maartenvanvliet
force-pushed
the
objects_must_define_fields
branch
from
September 8, 2022 10:07
c31d284
to
035df04
Compare
👍 I pushed some fixes |
Thanks! |
I think this should have been |
Good callout, the CHANGELOG has been updated accordingly. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an extra schema validation to ensure any object, input_object or interface declares one or more fields. See https://github.com/graphql/graphql-spec/blame/October2021/spec/Section%203%20--%20Type%20System.md#L868 in the spec. Introspection fields are not counted.
It affects a lot of test files since an empty
query do, ... end
is no longer allowed.For current users, since this change would be noticed during compilation, the impact is minimal. Some users might encounter invalid schemas.
fixes #1166
fixes #1105 as schema won't compile