-
Notifications
You must be signed in to change notification settings - Fork 63
Open
Description
I'm using TypeGraphQL for defining my schema and resolvers. When enabling graphql-jit and fetching a union type I got the following error:
Abstract type Notifiable must resolve to an Object type at runtime for field Notification.notifiable. Either the Notifiable type should provide a \"resolveType\" function or each possible types should provide an \"isTypeOf\" function
It works fine without graphql-jit.
Union type definition:
const NotifiableUnion = createUnionType({
name: 'Notifiable',
types: () => [A,B,] as const,
resolveType: value => {
if ('title' in value) {
return A;
}
return B;
},
});
Metadata
Metadata
Assignees
Labels
No labels