@@ -1875,6 +1875,10 @@ A GraphQL schema describes directives which are used to annotate various parts
18751875of a GraphQL document as an indicator that they should be evaluated differently
18761876by a validator , executor , or client tool such as a code generator .
18771877
1878+ **Built -in Directives **
1879+
1880+ :: A *built -in directive * is any directive defined within this specification .
1881+
18781882GraphQL implementations should provide the `@skip ` and `@include ` directives .
18791883
18801884GraphQL implementations that support the type system definition language must
@@ -1885,23 +1889,25 @@ GraphQL implementations that support the type system definition language should
18851889provide the `@specifiedBy ` directive if representing custom scalar
18861890definitions .
18871891
1888- When representing a GraphQL schema using the type system definition language ,
1889- built in directives (any defined in this specification) should be omitted for
1890- brevity . Custom directives in use must be specified .
1892+ When representing a GraphQL schema using the type system definition language
1893+ any *built -in directive * may be omitted for brevity .
1894+
1895+ When introspecting a GraphQL service all provided directives , including
1896+ any *built -in directive *, must be included in the set of returned directives .
18911897
18921898**Custom Directives **
18931899
1894- GraphQL services and client tooling may provide additional directives beyond
1895- those defined in this document . Directives are the preferred way to extend
1896- GraphQL with custom or experimental behavior .
1897-
1898- Note : When defining a directive , it is recommended to prefix the directive ' s
1899- name to make its scope of usage clear and to prevent a collision with directives
1900- which may be specified by future versions of this document (which will not
1901- include `_` in their name). For example , a custom directive used by Facebook ' s
1902- GraphQL service should be named `@fb_auth ` instead of ` @auth `. This is
1903- especially recommended for proposed additions to this specification which can
1904- change during the [RFC process ](https ://github .com /graphql /graphql -spec /blob /main /CONTRIBUTING .md ).
1900+ :: GraphQL services and client tooling may provide any additional
1901+ * custom directive * beyond those defined in this document . Directives are the
1902+ preferred way to extend GraphQL with custom or experimental behavior .
1903+
1904+ Note : When defining a * custom directive * , it is recommended to prefix the
1905+ directive ' s name to make its scope of usage clear and to prevent a collision
1906+ with * built - in directive * which may be specified by future versions of this
1907+ document (which will not include `_` in their name). For example , a
1908+ * custom directive * used by Facebook ' s GraphQL service should be named `@fb_auth `
1909+ instead of ` @auth `. This is especially recommended for proposed additions to
1910+ this specification which can change during the [RFC process ](https ://github .com /graphql /graphql -spec /blob /main /CONTRIBUTING .md ).
19051911For example a work in progress version of `@live ` should be named `@rfc_live `.
19061912
19071913Directives must only be used in the locations they are declared to belong in .
@@ -1986,9 +1992,9 @@ repeatable directives.
19861992directive @skip (if : Boolean !) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
19871993```
19881994
1989- The `@skip ` directive may be provided for fields , fragment spreads , and
1990- inline fragments , and allows for conditional exclusion during execution as
1991- described by the if argument .
1995+ The `@skip ` * built - in directive * may be provided for fields , fragment spreads ,
1996+ and inline fragments , and allows for conditional exclusion during execution as
1997+ described by the ` if ` argument .
19921998
19931999In this example `experimentalField ` will only be queried if the variable
19942000`$someTest ` has the value `false `.
@@ -2006,9 +2012,9 @@ query myQuery($someTest: Boolean!) {
20062012directive @include (if : Boolean !) on FIELD | FRAGMENT_SPREAD | INLINE_FRAGMENT
20072013```
20082014
2009- The `@include ` directive may be provided for fields , fragment spreads , and
2010- inline fragments , and allows for conditional inclusion during execution as
2011- described by the if argument .
2015+ The `@include ` * built - in directive * may be provided for fields , fragment
2016+ spreads , and inline fragments , and allows for conditional inclusion during
2017+ execution as described by the ` if ` argument .
20122018
20132019In this example `experimentalField ` will only be queried if the variable
20142020`$someTest ` has the value `true `
@@ -2035,8 +2041,8 @@ directive @deprecated(
20352041) on FIELD_DEFINITION | ENUM_VALUE
20362042```
20372043
2038- The `@deprecated ` directive is used within the type system definition language
2039- to indicate deprecated portions of a GraphQL service 's schema , such as
2044+ The `@deprecated ` * built - in directive * is used within the type system definition
2045+ language to indicate deprecated portions of a GraphQL service 's schema , such as
20402046deprecated fields on a type or deprecated enum values .
20412047
20422048Deprecations include a reason for why it is deprecated , which is formatted using
@@ -2059,10 +2065,10 @@ type ExampleType {
20592065directive @specifiedBy (url : String !) on SCALAR
20602066```
20612067
2062- The `@specifiedBy ` directive is used within the type system definition language
2063- to provide a *scalar specification URL * for specifying the behavior of
2064- [custom scalar types ](#sec-Scalars.Custom-Scalars). The URL should point to a
2065- human-readable specification of the data format, serialization, and
2068+ The `@specifiedBy ` * built - in directive * is used within the type system
2069+ definition language to provide a *scalar specification URL * for specifying the
2070+ behavior of [custom scalar types ](#sec-Scalars.Custom-Scalars). The URL should
2071+ point to a human-readable specification of the data format, serialization, and
20662072coercion rules. It must not appear on built-in scalar types.
20672073
20682074In this example, a custom scalar type for `UUID` is defined with a URL pointing
0 commit comments