"message": "Abstract type UnitEventDetails must resolve to an Object type at runtime for field UnitEvent.details with value { [REDACTED], type: 7, [REDACTED] }, received \"undefined\". Either the UnitEventDetails type should provide a \"resolveType\" function or each possible type should provide an \"isTypeOf\" function."
I am also getting this in the console:
Type "UnitEventDetails" is missing a "__resolveType" resolver. Pass false into "resolverValidationOptions.requireResolversForResolveType" to disable this warning.
I have tried messing around with the types, but unable to make it work?
First of all, thank you for this awesome library! It has been so much easier to get up and running with TypeScript and GraphQL.
I have in a situation, where I need to resolve a union type property in my schema:
In my 'UnitEventResolver` I have the following:
Then in my
UnitEventDetailsResolver
I have:And finally in my
CanErrorEventResolver
:However, I am getting this message:
I am also getting this in the console:
I have tried messing around with the types, but unable to make it work?
Can you point me in a direction to solve this?
Thanks!