Skip to content

Commit d11401b

Browse files
martinbonninbenjie
andauthored
Use the spec wording for "type-system" directives and "executable" directives (#8169)
Be consistent in wording. See https://discord.com/channels/625400653321076807/862834364718514196/1457146613314359448 for the discussion. --------- Co-authored-by: Benjie <[email protected]>
1 parent 186db45 commit d11401b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

docs/source/schema/directives.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,15 @@ If `@deprecated` appears elsewhere in a GraphQL document, it produces an error.
6767

6868
> If you create a [custom directive](#custom-directives), you need to define it (and its valid locations) in your schema. You don't need to define [default directives](#default-directives) like `@deprecated`.
6969

70-
### Schema directives vs. operation directives
70+
### Type system vs. executable directives
7171

72-
Usually, a given directive appears _exclusively_ in GraphQL schemas or _exclusively_ in GraphQL operations (rarely both, although the spec allows this).
72+
Usually, a given directive appears _exclusively_ in GraphQL type system documents (schemas) or _exclusively_ in GraphQL executable documents (operations and fragments). They rarely appear in both, although the spec allows this.
7373

74-
For example, among the [default directives](#default-directives), `@deprecated` is a schema-exclusive directive and `@skip` and `@include` are operation-exclusive directives.
74+
For example, among the [default directives](#default-directives), `@deprecated` is a type-system directive and `@skip` and `@include` are executable directives.
7575

76-
The [GraphQL spec](https://spec.graphql.org/June2018/#sec-Type-System.Directives) lists all possible directive locations. Schema locations are listed under `TypeSystemDirectiveLocation`, and operation locations are listed under `ExecutableDirectiveLocation`.
76+
The [GraphQL spec](https://spec.graphql.org/June2018/#sec-Type-System.Directives) lists all possible directive locations. Type-system locations are listed under `TypeSystemDirectiveLocation`, and executable locations are listed under `ExecutableDirectiveLocation`.
77+
78+
(The term "operation directive" is ambiguous, and so discouraged in favor of "executable directive". Similarly "type-system directive" is preferred over "schema directive".)
7779

7880
## Default directives
7981

0 commit comments

Comments
 (0)