How do I handle nested create mutations when I don...
# prisma-whats-new
j
How do I handle nested create mutations when I don't know the id of the nested node? E.g. creating a post, which has a user relationship and all I know is the user's email, not the id.
Copy code
mutation {
    createPost(
      postText: "awesome post"
      userId: getUserId('<mailto:email@gmail.com|email@gmail.com>')
    )
  }
a
@jlc467 I was thinking about creating a FR for allowing to reference a Type in a nested mutation by any unique field, for now you have to query the user first to get the ID
j
@agartha Thanks
n
👍 thanks guys
👍🏻 1