Replies: 1 comment
-
You can read up a bit on how union types work in Nexus, and how to add a |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I started using NEXUS and a question arose with unionType, follow my code:
At first it is working as expected, the .gql file is OK, however, I receive from my editor (VSCODE) the following message for the type: LoginResult:
Argument of type '{ name: "LoginResult"; definition(t: UnionDefinitionBlock): void; }' is not assignable to parameter of type 'NexusUnionTypeConfig<"LoginResult">'. Property 'resolveType' is missing in type '{ name: "LoginResult"; definition(t: UnionDefinitionBlock): void; }' but required in type '{ resolveType: AbstractTypeResolver<"LoginResult">; }'.ts(2345) typegenAbstractTypes.d.ts(354, 5): 'resolveType' is declared here.
How can I resolve this error message?
Tks,
Paulo
Beta Was this translation helpful? Give feedback.
All reactions