Skip to content

Commit

Permalink
Improve explanation of custom scalars vs Jackson
Browse files Browse the repository at this point in the history
See gh-569
  • Loading branch information
rstoyanchev committed Dec 9, 2022
1 parent d1300f5 commit 089c754
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spring-graphql-docs/src/docs/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,10 @@ You can use `RuntimeWiringConfigurer` to register:
`AnnotatedControllerConfigurer`, which detects annotated, `DataFetcher` handler methods.
The Spring Boot starter adds the `AnnotatedControllerConfigurer` by default.

NOTE: Unlike web frameworks, GraphQL does not use Jackson annotations to drive JSON serialization/deserialization.
Custom data types and their serialization https://www.graphql-java.com/documentation/scalars/[must be described as Scalars].
NOTE: GraphQL Java, server applications use Jackson only for serialization to and from maps of data.
Client input is parsed into a map. Server output is assembled into a map based on the field selection set.
This means you can't rely on Jackson serialization/deserialization annotations.
Instead, you can use https://www.graphql-java.com/documentation/scalars/[custom scalar types].

The Spring Boot starter detects beans of type `RuntimeWiringConfigurer` and
registers them in the `GraphQlSource.Builder`. That means in most cases, you'll' have
Expand Down

0 comments on commit 089c754

Please sign in to comment.