Skip to content

Commit 81a0182

Browse files
committed
update how to use section
1 parent 33df8dc commit 81a0182

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ This library provides extended scalars for [graphql-java](https://github.com/gra
1414
The GraphQL Specification defines `String`, `Int`, `Float`, `Boolean` and `ID` as well-defined [built-in scalars](https://spec.graphql.org/October2021/#sec-Scalars.Built-in-Scalars) that must be present in a graphql type
1515
system. Beyond these, it is up to an implementation about what [custom scalars](https://spec.graphql.org/October2021/#sec-Scalars.Custom-Scalars) are present.
1616

17-
The GraphQL Specification recommends the use of the [@specifiedBy](https://spec.graphql.org/October2021/#sec--specifiedBy) built-in schema directive to provide a scalar specification URL for specifying the behavior of custom scalar types.
18-
1917
You would use custom scalars when you want to describe more meaningful behavior or ranges of values.
2018

2119
# Getting started
@@ -76,6 +74,12 @@ If you are using [Netflix DGS](https://netflix.github.io/dgs), please see their
7674

7775
## How to add extended scalars to your schema
7876

77+
The GraphQL Specification recommends the use of the [@specifiedBy](https://spec.graphql.org/October2021/#sec--specifiedBy) built-in schema directive to provide a scalar specification URL for specifying the behavior of custom scalar types.
78+
79+
```graphql
80+
directive @specifiedBy(url: String!) on SCALAR
81+
```
82+
7983
To use a extended scalar in your schema, define the scalar like shown below for `DateTime`
8084

8185
```graphql

0 commit comments

Comments
 (0)