Skip to content

Commit b418b60

Browse files
committed
Update directive name to @specifiedBy
1 parent f72a146 commit b418b60

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

spec/Section 3 -- Type System.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -343,17 +343,17 @@ client-specific primitive for time. Another example of a potentially useful
343343
custom scalar is `Url`, which serializes as a string, but is guaranteed by
344344
the server to be a valid URL.
345345

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.
353353

354354
```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")
357357
```
358358

359359
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
16591659
the schema.
16601660

16611661
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
16631663
definitions.
16641664

16651665
Directives must only be used in the locations they are declared to belong in.
@@ -1792,15 +1792,15 @@ type ExampleType {
17921792
```
17931793

17941794

1795-
### @specified
1795+
### @specifiedBy
17961796

17971797
```graphql
1798-
directive @specified(
1799-
by: String!
1798+
directive @specifiedBy(
1799+
url: String!
18001800
) on SCALAR
18011801
```
18021802

1803-
The `@specified` directive is used within the type system definition language
1803+
The `@specifiedBy` directive is used within the type system definition language
18041804
to provide a URL for specifying the behaviour of custom
18051805
scalar definitions. The URL should point to a human-readable specification of
18061806
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
18201820
relevant IETF specifications.
18211821

18221822
```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")
18251825
```

spec/Section 4 -- Introspection.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ actually valid. These kinds are listed in the `__TypeKind` enumeration.
235235

236236
Represents scalar types such as Int, String, and Boolean. Scalars cannot have fields.
237237

238-
A GraphQL type designer should use the `@specified` directive to provide
238+
A GraphQL type designer should use the `@specifiedBy` directive to provide
239239
a specification URL describing the data format, serialization, and coercion
240240
rules for the scalar. It is recommended to also summarize the format and provide
241241
an example in the description field.

0 commit comments

Comments
 (0)