Skip to content

SchemaParserDictionary does not accept different types mapping to the same Java class #269

Answered by oliemansm
asfernandes asked this question in Q&A
Discussion options

You must be logged in to vote

The whole idea of this lib is that it matches an SDL to a class hierarchy. It does support Map<String,Object> representation, but not to represent an entire hierarchy. If you look at the test cases for supporting Maps with nested types it does not allow you to do something like Map<String,Map<String,Map<String,Object>>> but instead expects the value of the Map to be of a type that can be found, e.g. Map<String,Test>.

You'd be better of using graphql-java directly in this case to construct your schema and to wire the data fetchers. I don't know how large your static schema is that can be constructed using graphql-java-tools. You might be better off using graphql-java directly instead of us…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by vojtapol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #269 on December 21, 2020 15:52.