Description
when im putting the data of post in a prisma studio , it gives me this error , Type: undefined
Message:
Invalid prisma.post.create()
invocation:
{
data: {
slug: "1",
title: "1",
desc: "klad",
img: "/fashion.png",
views: 0,
cat: {
connect: {
? id?: String,
? slug?: String,
? AND?: CategoryWhereInput | CategoryWhereInput[],
? OR?: CategoryWhereInput[],
? NOT?: CategoryWhereInput | CategoryWhereInput[],
? title?: StringFilter | String,
? img?: StringNullableFilter | String | Null,
? Posts?: PostListRelationFilter
}
},
user: {
connect: {}
},
comments: {}
},
select: {
id: true,
createdAt: true,
slug: true,
title: true,
desc: true,
img: true,
views: true,
catSlug: true,
cat: true,
userEmail: true,
user: true,
comments: true
}
}
Argument connect
of type CategoryWhereUniqueInput needs at least one of id
or slug
arguments. Available options are listed in green.
Code: undefined
Query:
[object Object]
however ! i have read and change the code , but still i am getting this error while creating posts in prisma studio ,