paljs / prisma-tools

Prisma tools to help you generate CRUD system for GraphQL servers
https://paljs.com
MIT License
687 stars 55 forks source link

DeleteOneArgs where field should not be nullable #292

Closed ZenSoftware closed 1 year ago

ZenSoftware commented 1 year ago

Hi @AhmedElywa,

Pal.js SDL generation is producing arguments for DeleteOne...Args with a nullable where field for the TypeScript interfaces being generated. Prisma requires the where field for all single deletes. This is causing me some small issues when using TypeScript with "strictNullChecks": true. I thought you should know. Cheers 🥂

export interface DeleteOneUserArgs {
  where: UserWhereUniqueInput | null;
}

should be

export interface DeleteOneUserArgs {
  where: UserWhereUniqueInput;
}
AhmedElywa commented 1 year ago

Fixes in this pull request #309