Skip to content

Clarify query shorthand relationship with directives#873

Merged
leebyron merged 4 commits intomainfrom
benjie-query-shorthand-directives
Jun 3, 2022
Merged

Clarify query shorthand relationship with directives#873
leebyron merged 4 commits intomainfrom
benjie-query-shorthand-directives

Conversation

@benjie
Copy link
Copy Markdown
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
Comment thread spec/Section 2 -- Language.md Outdated
@leebyron
Copy link
Copy Markdown
Collaborator

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

@netlify
Copy link
Copy Markdown

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