Francisco Herrera
10/18/2019, 8:15 PMFrancisco Herrera
10/18/2019, 8:19 PMdatamodel.prisma
type User {
id: ID! @id
name: String!
email: String! @unique
password: String
resetToken: String
resetTokenExpiry: Float
permissions: [Permission] @scalarList(strategy: RELATION)
}
after I ran prisma deploy
, my generated/prisma.graphql
createad queries and mutations.
I try to run the query user(where: UserWhereUniqueInput!): User
the problem is that the UserWhereUniqueInput
generated looks like this:
input UserWhereUniqueInput {
id: ID
email: String
}
so when i try to query an user, i only have the id on my app, and the query is requesting both id and email
is this behavior normal, i was expecting to be able to query by id or email, not both at the same time to be able to get a single user
my other option would be to query users
and return the first element of the array.Piotr
10/18/2019, 10:43 PMChad H
10/19/2019, 3:39 AMaluminick
10/19/2019, 5:20 PMaluminick
10/19/2019, 5:21 PMreturn context.prisma.createVote({
user: { connect: { id: userId } },
link: { connect: { id: args.linkId } },
})
aluminick
10/19/2019, 5:21 PMconnect
key predefined?aluminick
10/19/2019, 5:21 PMaluminick
10/19/2019, 5:21 PMMohammad Javad Ebrahimzadeh
10/19/2019, 6:30 PMMohammad Javad Ebrahimzadeh
10/19/2019, 6:30 PMOh Hyun Won
10/20/2019, 3:05 PMcellograph
10/21/2019, 3:42 AMMohammad Javad Ebrahimzadeh
10/21/2019, 2:19 PMMohammad Javad Ebrahimzadeh
10/21/2019, 2:19 PMMohammad Javad Ebrahimzadeh
10/21/2019, 2:20 PMMohammad Javad Ebrahimzadeh
10/21/2019, 2:20 PMFoxinni
10/21/2019, 2:21 PM<https://www.codemochi.com/blog/2019-08-12-prisma-2-now>
Foxinni
10/21/2019, 2:23 PM/graphql
endpoint give me a bizarre error.Mohammad Javad Ebrahimzadeh
10/21/2019, 2:26 PMRicco
10/21/2019, 2:39 PMRicco
10/21/2019, 2:39 PMNikhil
10/21/2019, 2:52 PMNelson Pecora
10/21/2019, 4:04 PMseed
a bunch of data (~10k records) and I think I might be going about it wrongRicco
10/21/2019, 4:31 PMNelson Pecora
10/21/2019, 4:37 PM{ relationship: { connect: A } }
)cellograph
10/21/2019, 7:22 PMZane Helton
10/22/2019, 12:51 AMZane Helton
10/22/2019, 12:54 AMdanlannz
10/22/2019, 12:58 AMprisma generate
like it suggests