Hello guys, I am new to GraphQL and I wanted to kn...
# orm-help
b
Hello guys, I am new to GraphQL and I wanted to know if someone could answer a question for me. I am passing a public token that is being exchanged for a private token that comes with meta data, which we can call token_items. I wanted to create this token_item and update a user at the same time. Does anyone have a good way of doing this? So my Graphql schema is
Copy code
User {
  id: ID! @unique
  name: String!
  token_items: [Token!]!
}
Token {
  id: ID! @unique
  info: String!
  carrier: String!
}
I've tried something along the lines of:
Copy code
mutation {
  updateUser (
    where: {
      id: "1234"
    },
    data: {
      create: {
        info: "1234"
        carrier: "1234"
      }
   }
  )
  {
    id
    name
    email
    token_items {
      id
      info
      carrier
    }
  }
}