Unhandled Rejection (Invariant Violation): mutation option is required. You must specify your GraphQL document in the mutation option. code example

Example 1: Invariant Violation: mutation option is required. You must specify your GraphQL document in the mutation option.

client.mutate({
  mutation: gql`
    mutation {
      addTeam(input:{name:"Somename", label:"somelabel"}) {
        error
        status
      }
    }`,
})

Example 2: Invariant Violation: Must contain a query definition.

client.mutate({
  mutation: gql`
    mutation {
      addTeam(input:{name:"Somename", label:"somelabel"}) {
        error
        status
      }
    }`,
})