Nick
03/29/2021, 11:37 PMawait prisma.user.update({
where: {
id: input.id,
},
data: {
friended: {
connect: {
id: input.friendId,
},
},
},
})
Now I just need to figure out how to query on the friends for a user. I thought that I could just use a query like this -
type User {
id: Int!
name: String!
email: String!
friended: [Int]
friendedBy: [Int]
}
type Query {
users: [User!]!
}
But I just get nulls back for friended
and friendedBy