Open
Description
I currently extensively use the graphql-java-tools
library with success.
But I have a use case where I would like to relax/bypass the type checking of objects returned from a resolver.
Let's take a simple example with a graphql service A which has the following resolver:
public class FooResolver implements GraphQLQueryResolver {
public [Map or JsonNode] foo(String id, DataFetchingEnvironment env) {
// make graphql call to other service B
JsonObject foo = callRemoteService()
// here, i don't want to return an umarshalled instance of FooDto, but I want to return either
// a json object or a map.
return foo.
}
The type Foo
is declared in the graphql schema B and imported in the schema A. So we have the full type definition.
But in the code, I do not want to have the burden of redeclaring all the java types coming from schema B.
Is there any way to address this case ?
Thanks.