We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When upgrade to 3.64.0 of @pothos/plugin-prisma, typescript report a type error for every indirect relations. A sample code is below:
export const ConceptNode = builder.prismaNode('Concept', { description: 'Concept information', // https://pothos-graphql.dev/docs/plugins/prisma#select-mode-for-types select: { id: true }, // https://pothos-graphql.dev/docs/plugins/prisma#prismanode id: { field: 'id' }, fields: t => ({ version: t.exposeString('version', { description: 'Concept version' }), type: t.expose('type', { description: 'Concept type', type: ConceptCategoryEnum, }), name: t.exposeString('name', { description: 'Concept name' }), abbreviation: t.exposeString('abbreviation', { description: 'Concept abbreviation' }), description: t.exposeString('description', { description: 'Concept description' }), // https://pothos-graphql.dev/docs/plugins/prisma#indirect-relations-eg-join-tables superiors: t.field({ description: 'Superior concepts', select: (args, ctx, nestedSelection) => ({ superiors: { select: { superior: nestedSelection(true), }, }, }), type: [ConceptNode], resolve: concept => concept.superiors.map(({ superior }) => superior), }), }), })
The select field of superiors field report error: Type '{ superiors: { select: { superior: true; }; }; }' is not assignable to type 'never'.ts(2322)
Please check this. My whole project can not compile now.
The text was updated successfully, but these errors were encountered:
Have you rerun Prisma generate after upgrading?
Sorry, something went wrong.
Yes, I have re-run the generate command.
I haven't been able to replicate this in any of the repos I have that use the Prisma plugin. Is there a reproduction you might be able to share?
No branches or pull requests
When upgrade to 3.64.0 of @pothos/plugin-prisma, typescript report a type error for every indirect relations. A sample code is below:
The select field of superiors field report error: Type '{ superiors: { select: { superior: true; }; }; }' is not assignable to type 'never'.ts(2322)
Please check this. My whole project can not compile now.
The text was updated successfully, but these errors were encountered: