Skip to content

Commit 443c90f

Browse files
committed
update how to use section
1 parent 3727cfa commit 443c90f

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,17 @@ It's currently available from Maven Central.
4848

4949
## How to use extended scalars
5050

51+
### Direct use
52+
5153
Register the scalar with `graphql-java`
5254

5355
```java
5456
RuntimeWiring.newRuntimeWiring().scalar(ExtendedScalars.DateTime)
5557
```
5658

57-
Or if using [Spring for GraphQL](https://docs.spring.io/spring-graphql/docs/current/reference/html/), register the scalar with `RuntimeWiringConfigurer`
59+
### Spring for GraphQL
60+
61+
If you are using [Spring for GraphQL](https://docs.spring.io/spring-graphql/docs/current/reference/html/), register the scalar with `RuntimeWiringConfigurer`
5862

5963
```java
6064
@Configuration
@@ -66,7 +70,13 @@ public class GraphQlConfig {
6670
}
6771
```
6872

69-
And use the scalar in your schema
73+
### Netflix DGS
74+
75+
If you are using [Netflix DGS](https://netflix.github.io/dgs) see their [configuration documentation](https://netflix.github.io/dgs/configuration/#dgs-extended-scalars-graphql-dgs-extended-scalars)
76+
77+
## How to add extended scalars to your schema
78+
79+
To use a extended scalar in your schema, define the scalar like shown below for `DateTime`
7080

7181
```graphql
7282
scalar DateTime

0 commit comments

Comments
 (0)