@@ -343,17 +343,17 @@ client-specific primitive for time. Another example of a potentially useful
343
343
custom scalar is ` Url ` , which serializes as a string, but is guaranteed by
344
344
the server to be a valid URL.
345
345
346
- When defining an additional scalar, GraphQL systems should use the ` @specified `
347
- directive to provide a URL pointing to a human-readable specification of the
348
- data format, serialization, and coercion rules for the scalar. For example, a
349
- GraphQL system providing a ` UUID ` scalar might link to RFC 4122, or some
350
- document defining a reasonable subset of that RFC. If a specification URL is
351
- present, systems must conform to the described rules. Built-in scalar types
352
- should not provide a URL.
346
+ When defining an additional scalar, GraphQL systems should use the
347
+ ` @specifiedBy ` directive to provide a URL pointing to a human-readable
348
+ specification of the data format, serialization, and coercion rules for the
349
+ scalar. For example, a GraphQL system providing a ` UUID ` scalar might link to
350
+ RFC 4122, or some document defining a reasonable subset of that RFC. If a
351
+ specification URL is present, systems must conform to the described rules.
352
+ Built-in scalar types should not provide a URL.
353
353
354
354
``` graphql example
355
- scalar UUID @specified ( by : " https://tools.ietf.org/html/rfc4122" )
356
- scalar URL @specified ( by : " https://tools.ietf.org/html/rfc3986" )
355
+ scalar UUID @specifiedBy ( url : " https://tools.ietf.org/html/rfc4122" )
356
+ scalar URL @specifiedBy ( url : " https://tools.ietf.org/html/rfc3986" )
357
357
```
358
358
359
359
A server may omit any of the built -in scalars from its schema , for example if a
@@ -1659,7 +1659,7 @@ provide the `@deprecated` directive if representing deprecated portions of
1659
1659
the schema.
1660
1660
1661
1661
GraphQL implementations that support the type system definition language should
1662
- provide the ` @specified ` directive if representing custom scalar
1662
+ provide the ` @specifiedBy ` directive if representing custom scalar
1663
1663
definitions.
1664
1664
1665
1665
Directives must only be used in the locations they are declared to belong in.
@@ -1792,15 +1792,15 @@ type ExampleType {
1792
1792
```
1793
1793
1794
1794
1795
- ### @specified
1795
+ ### @specifiedBy
1796
1796
1797
1797
``` graphql
1798
- directive @specified (
1799
- by : String !
1798
+ directive @specifiedBy (
1799
+ url : String !
1800
1800
) on SCALAR
1801
1801
```
1802
1802
1803
- The `@specified ` directive is used within the type system definition language
1803
+ The `@specifiedBy ` directive is used within the type system definition language
1804
1804
to provide a URL for specifying the behaviour of custom
1805
1805
scalar definitions . The URL should point to a human -readable specification of
1806
1806
the data format , serialization , and coercion rules for the scalar . For example ,
@@ -1820,6 +1820,6 @@ In this example, two custom scalar types are defined with URLs pointing to the
1820
1820
relevant IETF specifications .
1821
1821
1822
1822
```graphql example
1823
- scalar UUID @specified ( by : " https://tools.ietf.org/html/rfc4122" )
1824
- scalar URL @specified ( by : " https://tools.ietf.org/html/rfc3986" )
1823
+ scalar UUID @specifiedBy ( url : " https://tools.ietf.org/html/rfc4122" )
1824
+ scalar URL @specifiedBy ( url : " https://tools.ietf.org/html/rfc3986" )
1825
1825
```
0 commit comments