Type resolution for complex class hierarchy #753
Unanswered
thedeadferryman
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let's say we have class structure like this:
Classes in green are interfaces and there are corresponding type declarations in graphql schema. But the resolver returns instances of actual classes (highlighted in blue). When it comes to type resolution,
DictionaryTypeResolver
takes superclasses first, not interfaces, so the resolution sequence looks like this (forFolderImpl
):FolderImpl -> FSNodeImpl -> FSNode -> gql interface FSNode
. As a result, it fails with an error ofFSNode
being an interface, not an object type.However, the resolution sequence I expected is
FolderImpl -> Folder -> gql objtype Folder
.I understand that this may be expected behavior, but the question is: in what way can this be solved besides just removing
FSNodeImpl
from the class structure?Beta Was this translation helpful? Give feedback.
All reactions