Dkyc
Dkyc
PPrisma
Created by Uncle on 9/2/2024 in #help-and-questions
Validator questions
i copy pasted from another question i answered that was asking about the same thing
13 replies
PPrisma
Created by Uncle on 9/2/2024 in #help-and-questions
Validator questions
i didn't see you already answered Raphael. sry 😅
13 replies
PPrisma
Created by Uncle on 9/2/2024 in #help-and-questions
Validator questions
hello. try it like this
const postWithUser = Prisma.validator<Prisma.PostDefaultArgs>()({
include: {
User: true
}
});
export type PostWithUser = Prisma.PostGetPayload<typeof postWithUser>;
const postWithUser = Prisma.validator<Prisma.PostDefaultArgs>()({
include: {
User: true
}
});
export type PostWithUser = Prisma.PostGetPayload<typeof postWithUser>;
13 replies
PPrisma
Created by bockster6669 on 9/3/2024 in #help-and-questions
Prisma Types
hello. try it like this
const postWithUser = Prisma.validator<Prisma.PostDefaultArgs>()({
include: {
User: true
}
});
export type PostWithUser = Prisma.PostGetPayload<typeof postWithUser>;
const postWithUser = Prisma.validator<Prisma.PostDefaultArgs>()({
include: {
User: true
}
});
export type PostWithUser = Prisma.PostGetPayload<typeof postWithUser>;
6 replies
PPrisma
Created by Snarkatude on 8/28/2024 in #help-and-questions
how do I do this upsert query in prisma?
where: {
userId_itemId: {
itemId: item.id,
userId: user.id,
},
},
where: {
userId_itemId: {
itemId: item.id,
userId: user.id,
},
},
didn't know you could merge where clauses like that
9 replies
PPrisma
Created by mata on 8/13/2024 in #help-and-questions
Share prisma schema and client between two backend services.
maybe this might help you; you can run npx prisma generate in each subfolder but add this to to both package.json files:
"prisma": {
"schema": "../prisma/schema.prisma"
}
"prisma": {
"schema": "../prisma/schema.prisma"
}
4 replies
PPrisma
Created by Anas Badran on 8/11/2024 in #help-and-questions
unique constraints
this sounds like a job you need to do in your code
4 replies