From 83d26467e73ea48cac77e75bfdca34cecc314e38 Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Thu, 10 Mar 2022 11:10:09 +0100 Subject: [PATCH] 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 --- spring-graphql-docs/src/docs/asciidoc/index.adoc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/spring-graphql-docs/src/docs/asciidoc/index.adoc b/spring-graphql-docs/src/docs/asciidoc/index.adoc index ce61a824..6a0e271b 100644 --- a/spring-graphql-docs/src/docs/asciidoc/index.adoc +++ b/spring-graphql-docs/src/docs/asciidoc/index.adoc @@ -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: