docs icon indicating copy to clipboard operation
docs copied to clipboard

Add disclaimer regarding usage of direct foreign key values

Open igorrocha opened this issue 1 year ago • 1 comments

Describe this PR

The examples section of the connect nested query page currently indicates that you can set foreign keys directly.

However, when you try to use both the direct way of setting a foreign key and the connect query, you get a type error, due to the fact that it is unpractical to generate types for every combination of inputs using direct assignment and connect, as described in this issue comment.

Since this behavior is intentional, and the error you get when trying to combine both approaches isn't very clear, I realized a note on the documentation could prevent some people stumbling on this problem.

Changes

Added a short disclaimer explaining that you can only use one of the two approaches in the same query (the sentence after the code example).

image

What issue does this fix?

Not applicable.

Any other relevant information

I decided to link the main repository's relevant issue to the docs rather than explaining the reasoning behind the limitation, because I figured the disclaimer would get too long otherwise. Please feel free to improve on the disclaimer in case it isn't optimal as is.

igorrocha avatar Feb 27 '24 18:02 igorrocha

@igorrocha is attempting to deploy a commit to the Prisma Team on Vercel.

A member of the Team first needs to authorize it.

vercel[bot] avatar Feb 27 '24 18:02 vercel[bot]