You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 (for FolderImpl): FolderImpl -> FSNodeImpl -> FSNode -> gql interface FSNode. As a result, it fails with an error of FSNode 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?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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