There is no possibility of setting the value "null" for arguments because of the restrictions on types
Reproduction
Scheme
type User {
id: ID! @unique
name: String!
}
type Post {
id: ID! @unique
isPublished: Boolean! @default(value: "false")
title: String!
text: String # Not required
user: User # Not required
}
myResolver(parent, args, context, info) {
return context.db.query.posts(
{
where: {
isPublished: true,
user: null // Error: The type "null" can not be assigned for the type "UserWhereInput | undefined".
}
},
info
);
}
I tried the quick fix of adding | null here, but it's much more entangled there with all those recursive calls. It would probably require some different approach.
Bug Report
Current behavior
There is no possibility of setting the value "null" for arguments because of the restrictions on types
Reproduction
Scheme
./generated/prisma.ts
Resolver usage
Expected behavior?
No typescript validation errors.