Document why Jackson annotations are not used

This commit explains why Jackson annotations have no impact on the
serialization/deserialization process. Instead applications should
describe and coerce types using scalars.

Fixes gh-321
This commit is contained in:
Brian Clozel
2022-03-10 11:10:09 +01:00
parent 1e652f800b
commit 83d26467e7

View File

@@ -256,6 +256,9 @@ 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].
The Spring Boot starter detects beans of type `RuntimeWiringConfigurer` and
registers them in the `GraphQlSource.Builder`. That means in most cases, you'll' have
something like the following in your configuration: