Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add disclaimer regarding usage of direct foreign key values #5683

Merged
merged 5 commits into from
Sep 17, 2024

Conversation

igorrocha
Copy link
Contributor

@igorrocha igorrocha commented Feb 27, 2024

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.

Copy link

vercel bot commented Feb 27, 2024

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

A member of the Team first needs to authorize it.

@jharrell jharrell merged commit 405bf33 into prisma:main Sep 17, 2024
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants