We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 153a0a0 + 4ec73bb commit da5992dCopy full SHA for da5992d
1 file changed
src/main/java/graphql/servlet/GraphQLObjectMapper.java
@@ -1,5 +1,6 @@
1
package graphql.servlet;
2
3
+import com.fasterxml.jackson.annotation.JsonInclude;
4
import com.fasterxml.jackson.core.JsonProcessingException;
5
import com.fasterxml.jackson.core.type.TypeReference;
6
import com.fasterxml.jackson.databind.MappingIterator;
@@ -43,8 +44,10 @@ public ObjectMapper getJacksonMapper() {
43
44
if (result == null) { // First check (no locking)
45
synchronized(this) {
46
result = mapper;
- if (result == null) // Second check (with locking)
47
- mapper = result = objectMapperProvider.provide();
+ if (result == null) { // Second check (with locking)
48
+ mapper = result = objectMapperProvider.provide().copy();
49
+ mapper.setDefaultPropertyInclusion(JsonInclude.Include.ALWAYS);
50
+ }
51
}
52
53
0 commit comments