Skip to content

Nested write issue #18877

Closed Answered by ludralph
riccardolardi asked this question in Q&A
Apr 22, 2023 · 5 comments · 4 replies
Discussion options

You must be logged in to vote

Hi @riccardolardi

When performing a create operation, data is the type of XOR<ApplicationCreateInput,ApplicationUncheckedCreateInput > which means you can either provide ApplicationCreateInput which will have all nested relations specified or you can directly provide the ID as in the case of applicantId field but you can’t mix them. So you will need to use the fields specified in ApplicationUncheckedCreateInput in order to create it. Also, Unchecked input types allow you to perform some operations that Prisma considers dangerous like directly writing foreign keys. Prisma allows you to choose either a safe or an unchecked input type when doing operations like create. In this case, Prisma w…

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@ludralph
Comment options

@ludralph
Comment options

Comment options

You must be logged in to vote
1 reply
@ludralph
Comment options

Answer selected by riccardolardi
Comment options

You must be logged in to vote
1 reply
@ludralph
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants