21

I saw clientMutationId field in example-strong-typing documentation.

mutation {
  addComment(input:{clientMutationId: 1234, subjectId: "MDA6SXNzdWUyMjcyMDA2MTT=", body: "Looks good to me!"}) {
    clientMutationId
    commentEdge {
      node {
        body
        repository {
          id
          name
          nameWithOwner
        }
        issue {
          number
        }
      }
    }
  }
}

what does clientMutationId mean? How can I generate it?

Lin Du
  • 88,126
  • 95
  • 281
  • 483

1 Answers1

23

clientMutationId is not directly related with GraphQL but it is with graphql-relay.

Check Understanding Relay Mutations for a better explanation.

clientMutationId. This ID is generated by the Relay client behind the scenes to track the mutation's progress.

Marco Daniel
  • 5,467
  • 5
  • 28
  • 36