MichalLytek / MichalLytek/typegraphql-prisma
compatibility issue in generated code for prisma v5 not assignable to type
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 918
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the Bug**
compatibility issue in generated code for prisma v5
```
Type 'UserWhereUniqueInput' is not assignable to type '{ id: string; email: string; } & { id?: string | undefined; email?: string | undefined; AND?: UserWhereInput | UserWhereInput[] | undefined; OR?: UserWhereInput[] | undefined; NOT?: UserWhereInput | ... 1 more ... | undefined; password?: string | ... 1 more ... | undefined; createdAt?: string | ... 3 more ... | unde...'.
Type UserWhereUniqueInput is not assignable to type { id: string; email: string; } ...
```
**Environment (please complete the following information):**
- Node v20.11.1
- `typegraphql-prisma` last current version
- Prisma version 5
[see isssue] (https://github.com/unlight/prisma-nestjs-graphql/issues/177#issuecomment-2002730860)
at the end one solution
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the generated TypeScript types and the linked issue comment, then reproduce the incompatibility with Node v20.11.1, typegraphql-prisma, and Prisma 5. Done means the generated UserWhereUniqueInput is assignable to the expected input type without the reported TypeScript error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- graphql, node.js, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100