Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion spec/Section 3 -- Type System.md
Original file line number Diff line number Diff line change
Expand Up @@ -1607,7 +1607,7 @@ Expected Type | Internal Value | Coerced Result

## Directives

DirectiveDefinition : Description? directive @ Name ArgumentsDefinition? on DirectiveLocations
DirectiveDefinition : Description? directive @ Name ArgumentsDefinition? on DirectiveLocations Directives[Const]?
Copy link
Copy Markdown
Member

@benjie benjie Oct 20, 2025

Choose a reason for hiding this comment

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

One thing to consider is that this position would prevent future deprecation of one of the positions:

directive @foo on
| QUERY
| MUTATION @deprecated(reason: "Doesn't work well with side effects")
| SUBSCRIPTION

(I don't think this is particularly important, but it's worth noting.)

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.

You mean because the syntax would become ambiguous, right? I think I'm okay with this (famous last words 😅 )


DirectiveLocations :
- `|`? DirectiveLocation
Expand Down Expand Up @@ -1639,6 +1639,7 @@ TypeSystemDirectiveLocation : one of
`ENUM_VALUE`
`INPUT_OBJECT`
`INPUT_FIELD_DEFINITION`
`DIRECTIVE_DEFINITION`

A GraphQL schema describes directives which are used to annotate various parts
of a GraphQL document as an indicator that they should be evaluated differently
Expand Down