It seems i'm not able to create multiple entries o...
# orm-help
c
It seems i'm not able to create multiple entries of a type when seeding.
Copy code
mutation seed {
  createUser(data: { username: "Foo" }) { id }
  createUser(data: { username: "Bar" }) { id }
}
There is no createMany. I could split it into multiple mutations, but then i can run only one of them by name. How do i do this? Edit: Okay, 2 more minutes of searching would have sufficed. Found it in one of the examples:
Copy code
mutation seed {
  user1: createUser(data: { username: "Foo" }) { id }
  user2: createUser(data: { username: "Bar" }) { id }
}
👍 1
w
use gql aliases
❤️ 1