Skip to content

Fix callout: variables don't require a named operation - #2562

Open
rudney5000 wants to merge 1 commit into
graphql:sourcefrom
rudney5000:fix/variables-callout
Open

rudney5000 wants to merge 1 commit into
graphql:sourcefrom
rudney5000:fix/variables-callout

Conversation

@rudney5000

Copy link
Copy Markdown

Description

The callout in the Variables section says a GraphQL document must have an operation type and name to use variables. Per the spec, only the operation type is required: anonymous operations such as query ($id: ID!) { ... } may declare variables. Only the query shorthand cannot have variable definitions (§2.3 Document, §2.4 Operations).

The callout also contradicted the "Operation name" section of the same page, which says the name is only required in multi-operation documents (see also #441).

This rewords the callout accordingly and keeps naming the operation as a recommended practice.

@vercel

vercel Bot commented Oct 29, 2026

Copy link
Copy Markdown

@rudney5000 is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: rudney5000 / name: rudney5000 (9ac4196)

@martinbonnin martinbonnin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for catching this 🙏

@martinbonnin

Copy link
Copy Markdown
Contributor

Can you sign the CLA? More info there: https://graphql.org/community/contribute/project-meetings/#sign-the-easycla

@rudney5000

Copy link
Copy Markdown
Author

Done, the CLA is signed. Thanks for the review!

@martinbonnin

Copy link
Copy Markdown
Contributor

Thanks! I'll leave this open a few days, make sure to get other people inputs in case we're missing something but LGTM!

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants