graphql-platform
graphql-platform copied to clipboard
Use NodeResolver on interface or abstract types
As an attempt to fix #5414 will start this PR.
For the moment just added tests which are failing because NodeResolver don't support interface or abstract class.
/azp run
Azure Pipelines successfully started running 2 pipeline(s).
@michaelstaib
-
I have enabled the usage of interfaces in
NodeResolverTypeInterceptorhowever it's still an open point theRelayIdFieldHelpers.ApplyIdToFieldwhich supports onlyObjectFieldDefinitionand rely heavy on this implementation. -
I have added one more tests with
Query12which is usingabstract class/recordand it's shaping this as an interface on the schema. I think this will be a nicer way to represent it by default (schema forQuery11is the default representation). -
On the representation of
Query11I think is wrong that the derived type don't implements the abstract one on the schema, this is also another point for which I think we should change theabstract class/recordtointerface -
One more question would be the type discovery, in the tests I've registered the derived type manually, but I think this should be added by default on the schema (all the derived typed of the
NodeResolverreturn type).
Sorry for the delay ... I will now look at this one.