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

Cover empty field-selections #4228

Merged
merged 1 commit into from
Oct 13, 2024
Merged

Cover empty field-selections #4228

merged 1 commit into from
Oct 13, 2024

Conversation

JoviDeCroock
Copy link
Member

@JoviDeCroock JoviDeCroock commented Oct 13, 2024

Closes #3790

This follows the spec closer to the letter as we consider empty selection-sets invalid as well. This however does not cover empty operation-definitions, which should also be considered invalid.

The parser itself considers empty-selections invalid as it requires you to specify a name before a closing curly, hence why testing happens a bit more manual here. Despite our parser not considering this valid, I think this is good to validate when folks use a separate parser or construct documents manually as this is valid in our type-system.

@JoviDeCroock JoviDeCroock requested a review from a team as a code owner October 13, 2024 14:18
Copy link

netlify bot commented Oct 13, 2024

Deploy Preview for compassionate-pike-271cb3 ready!

Name Link
🔨 Latest commit ef94e2a
🔍 Latest deploy log https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/670bf0ffe5cdbf0008179419
😎 Deploy Preview https://deploy-preview-4228--compassionate-pike-271cb3.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

Hi @JoviDeCroock, I'm @github-actions bot happy to help you with this PR 👋

Supported commands

Please post this commands in separate comments and only one per comment:

  • @github-actions run-benchmark - Run benchmark comparing base and merge commits for this PR
  • @github-actions publish-pr-on-npm - Build package from this PR and publish it on NPM

@JoviDeCroock JoviDeCroock force-pushed the empty-selection-rule branch 2 times, most recently from abdb9ac to 9a204e3 Compare October 13, 2024 14:18
@JoviDeCroock JoviDeCroock added the PR: bug fix 🐞 requires increase of "patch" version number label Oct 13, 2024
Copy link
Contributor

@yaacovCR yaacovCR left a comment

Choose a reason for hiding this comment

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

Makes sense to match the spec as written, although in theory it would be a good discussion for the WG why the ScalarLeafsRule covers empty selection sets, presumably the empty selection set implies a leaf and that's invalid, but it's a bit of a stretch. I think for now it is the right thing to match the specification with little downside.

@JoviDeCroock JoviDeCroock merged commit 0254e5f into main Oct 13, 2024
34 checks passed
@yaacovCR yaacovCR deleted the empty-selection-rule branch October 27, 2024 19:08
JoviDeCroock added a commit that referenced this pull request Nov 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: bug fix 🐞 requires increase of "patch" version number
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants