Closed razilevin closed 6 months ago
Hello, it's the same issue as #205.
I'm working on it. But the issue is not in the plugin's code. It's in the graphql-java core tool.
I'll create a demo project, before filing an issue to the graphql-java team.
Etienne
Given this hack on the generated CustomJacksonDeserializers for just that mapping of JSON scalar using the following implementation everything works as expected.
@Override public Object deserialize(JsonParser p, DeserializationContext ctxt) throws IOException, JsonProcessingException {
return p.readValueAsTree();
}
Can you explain to me why you think it is not in your implementation of the AbstractCustomJacksonDeserializer deserialize function?
Hello,
Thank you for your comment. I came to the same conclusion (that the issue is in the plugin).
This custom serialization / deserialization has become too complex. But I need to keep it for backward compatibility. The main issue is to make it work for all possible cases.
Étienne
Hello,
The 2.4 version has been released. It handles the JSON and Object custom scalars.
Etienne
In regards to
https://github.com/graphql-java-generator/graphql-maven-plugin-project/issues/93
seems like many projects abuse the JSON scalar so that their services can return a graph of any shape. Calling GQL services applying the same approach I get an exception thrown in class AbstractCustomJacksonDeserializer.
the token in question is '{'. I am having a hard time trying to work around this issue. Say I wanted it to work I would apply the following to your code base
I don't mind using a JsonNode as the return type. Any suggestions?