Add descriptions to executable definitions
At a glance​
- Identifier: #892
- Stage: RFC1: Proposal
- Champion: @IvanGoncharov
- PR: Add descriptions to executable definitions
Timeline​
- Spec PR created on 2021-10-07 by IvanGoncharov
- Commit pushed: Add descriptions to executable definitions on 2021-10-07 by @IvanGoncharov
- Added to 2021-10-07 WG agenda
- Mentioned in 2021-10-07 WG notes
Was already discussed during WG: https://github.com/graphql/graphql-wg/blob/main/notes/2021-04-01.md#adding-descriptions-to-queries-and-fragments-ivan
I prepare a format proposal, here is a couple of key points:
- You can add descriptions on operations, fragments, and query variables
- You can't add description on the short form of operation only full form.
Example:
"Some description"
query SomeOperation(
"ID you should provide"
$id: String
"Switch for experiment ...."
$enableBaz: Boolean = false,
) {
foo(id: $id) {
bar
baz @include(if: $enableBaz) {
...BazInfo
}
}
}
"Some description here"
fragment BazInfo on Baz {
# ...
}