About schema changes after introspect #2169
Replies: 1 comment
-
You can filter on any field when querying multiple results with If you, for some reason, want to filter on non-unique field and get the first result, you can do like this: const row = await db.users.findMany({
first: 1,
where: { lastName: "Example" },
}).then(result => result[0]); |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everybody.
Is it a good practice to make changes inside the prisma.schema file after the autogenerated prisma introspect? I would like to adjust some relation field names.
Also, what is the better way to define the created inputs for queries after prisma generate? I mean, there are other not so important fields that I need to filter on the where clauses and I saw that I cannot use where on non-Unique inputs anymore. At least it was not generated for me. Just looking for some tips.
Using prisma 2 beta 2 and the new nexus framework.
Thank you and the new prisma is amazing.
Beta Was this translation helpful? Give feedback.
All reactions