At a glance
- Project
- GraphQL Spec
- Identifier
- #1170
- Stage
- RFC 3 / Accepted
- Champion
- @fotoetienne
- Updated
- 2025-09-15
- Latest activity
- Pull request merged on
- Source
- Pull request
- Related RFCs
- #892
Pull request description
This PR builds upon @IvanGoncharov's 2021 RFC, with changes rebased onto the current spec and updated to incorporate feedback from previous discussion as well as an additional editorial pass.
Descriptions are a core feature of GraphQL, enabling schema and document authors to provide human-readable documentation directly alongside type system elements and executable definitions. This proposal extends the utility of descriptions by allowing them to appear not only on type system definitions, but also on operations, fragments, and variable definitions within executable documents.
Enabling descriptions in these locations improves the expressiveness and maintainability of GraphQL documents, supports better tooling and code generation, and enhances the developer experience by making intent and usage clearer at the point of definition. Importantly, descriptions remain non-semantic—they do not affect execution, validation, or response—ensuring that they serve purely as documentation and can be safely removed without impacting behavior. This change aligns with GraphQL’s commitment to self-documenting APIs and empowers teams to deliver more understandable and maintainable GraphQL applications.
Key points:
- You can add descriptions on operations, fragments, and query variables
- You can't add description on the the shorthand form of operations, only the full form
- Descriptions on operations do not affect query execution, validation, or response
Example:
"""
Request the current status of a time machine and its operator.
"""
query GetTimeMachineStatus(
"The unique serial number of the time machine to inspect."
$machineId: ID!
"""
The year to check the status for.
**Warning:** certain years may trigger an anomaly in the space-time continuum.
"""
$year: Int
) {
timeMachine(id: $machineId) {
...TimeMachineDetails
operator {
name
licenseLevel
}
status(year: $year)
}
}
"Time machine details."
fragment TimeMachineDetails on TimeMachine {
id
model
lastMaintenance
}
Implemented in Graphql.js by https://github.com/graphql/graphql-js/pull/4430
Timeline
July 2025
- Pull request merged on by leebyron
- 3 commits pushed on
- @leebyron committed "Editorial: move descriptions definition above document"
- @leebyron committed "editorial: move examples back to type system, add some links"
- @leebyron committed "Editorial"
- Advanced to RFC 3 on by leebyron
June 2025
- 2 commits pushed on
- @fotoetienne committed "Refactor descriptions text, incorporating feedback from working group"
- @fotoetienne committed "formatting"
- Advanced to RFC 3 on by leebyron
- Discussed in GraphQL WGNext Steps
Stephen: Update the descriptions on executable definitions PR to deduplicate text between sections 2 and 3, remove redundant definition, and rename section titles
Zoom summary · GraphQL WG · 2025-06-26Lee reviews the agenda for the meeting, which includes discussions on schema coordinates, specified definitions as a new appendix section, descriptions on executable definitions, editorial review for execution result, and several RFCs from Steven and Benjie. Benjie mentions the addition of a new RFC status for GraphQL WG. The meeting begins with introductions from attendees and a reminder to contribute to the notes document, especially for technical content that the AI note-taker might miss.
Zoom summary · GraphQL WG · 2025-06-26Lee suggests merging the pull request with minor changes, including removing modifications to introspection and updating to GraphQL.js alpha 9. Benjie proposes moving some fields to higher positions for better organization. The group agrees to make these changes and merge the pull request. Lee initially misunderstands the proposed changes but quickly corrects himself. The discussion then shifts to descriptions on executable definitions, with Stephen reporting that the spec edits and GraphQL.js implementation are nearly ready. The group considers moving this proposal to RFC 3 status, and Martin mentions that Apollo team members are excited about its potential for AI-related work.
Zoom summary · GraphQL WG · 2025-06-26GraphQL Descriptions Section RestructuringStephen and Lee discuss reorganizing the GraphQL specification's sections on descriptions. They agree to move the main definition of descriptions from section 3 to section 2, making it a core language concept rather than just part of the type system. The section in 2 will be titled "Descriptions" and will cover descriptions more holistically, including their use in queries and schemas. Section 3.2 will be renamed "Type System Descriptions," with its content reduced to reemphasize the importance of descriptions in the type system and provide specific examples. They plan to remove duplicate grammar definitions and deduplicate text between the sections.
Zoom summary · GraphQL WG · 2025-06-26 - @fotoetienne committed "Single quotes for single line description" on
- Top comment edited on by fotoetienne
- 5 commits pushed on
- @fotoetienne committed "Refactor description section for clarity"
- @fotoetienne committed "Add optional description to fragment and variable definitions"
- @fotoetienne committed "Prettier"
- @fotoetienne committed "Refactor time machine status query documentation for clarity and conc…"
- @fotoetienne committed "Reduced example"
- Top comment edited on by fotoetienne
- Top comment edited on by fotoetienne
- Pull request created on by fotoetienne
- 2 commits pushed on
- @fotoetienne committed "Updated spec wording for descriptions in executable documents"
- @fotoetienne committed "Add example label to GraphQL code block in Language section"
October 2021
- @IvanGoncharov committed "Add descriptions to executable definitions" on