Skip to content

Clarify query shorthand relationship with directives #873

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

Merged
merged 4 commits into from
Jun 3, 2022

Conversation

benjie
Copy link
Member

@benjie benjie commented May 27, 2021

The spec text currently reads:

If a document contains only one operation and that operation is a query which
defines no variables and contains no directives then that operation may be
represented in a short-hand form which omits the {query} keyword and operation
name.

The word "contains" here is ambiguous, and it makes it sound like the following query is invalid since it "contains" a directive:

{
  __typename @skip(if: true)
}

Really we mean that there is no direcive applied to the operation itself (directly); I've attempted to clarify this without making the text more verbose.

@benjie benjie added the ✏️ Editorial PR is non-normative or does not influence implementation label May 27, 2021
@leebyron
Copy link
Collaborator

I'll wait to merge until after the spec release cut

@netlify
Copy link

netlify bot commented Jun 3, 2022

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 0cb3c66
🔍 Latest deploy log https://app.netlify.com/sites/graphql-spec-draft/deploys/6299a2064f0a1300086aff89
😎 Deploy Preview https://deploy-preview-873--graphql-spec-draft.netlify.app/draft
📱 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 settings.

@leebyron leebyron merged commit 4de8782 into main Jun 3, 2022
@leebyron leebyron deleted the benjie-query-shorthand-directives branch June 3, 2022 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✏️ Editorial PR is non-normative or does not influence implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants