Hello :slightly_smiling_face: Can somebody point m...
# random
b
Hello 🙂 Can somebody point me to some information about where to create a mutation with dependencies nested, in the Prisma website I can see the basic example of a mutation. At the moment I am looking for an option to create a Traveller model, with a Location model.
m
We call this feature Nested Mutations. Take a look here: https://docs-beta.prisma.io/1.13/use-prisma-api/api-reference/mutations-qwe2/#nested-mutations It basically allows you to write your mutations roughly like this:
Copy code
mutation {
  createTraveller(data: {
    name: "Marcus"
    location: {
      create: {
        name: "My Location"
      }
    }
  }){
   id
  }
}