how does one deals with mutations requiring an cus...
# prisma-whats-new
m
how does one deals with mutations requiring an custom Type object and not just a primitive type. -
Copy code
mutation CreateLinkMutation($description: String!, $url: String!, $postedBy: User) {
    createLink(
      description: $description,
      url: $url,
      postedBy: $postedBy,
    ) {
      id
      createdAt
      url
      description
      postedBy
    }
  }
n
that's a very broad question. but you could start looking here for example: https://www.graph.cool/forum/t/trouble-getting-my-nested-mutation-to-work/244?u=nilan
m
i guess a better way to phrase this would be - how to write a mutation against something like this
Copy code
type Link implements Node {
  id: ID! @isUnique
  ...
  postedBy: User @relation(name: "UsersLinks")
}
the i dont know how to add the current user to the mutation - i was adding the user id but that obviously gave me an error since it is a string… I’m trying to understand how to properly write my mutation
m
ha the doc is finally working ! thanks i will slowly read it all 😁
😄 1