github graphql api,“clientMutationId”是什么意思?

2024-01-12

I saw clientMutationId领域在示例强类型 https://developer.github.com/v4/guides/migrating-from-rest/#example-strong-typing文档。

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

什么是clientMutationId意思是?我怎样才能生成它?


clientMutationId与 GraphQL 没有直接关系,但与graphql 中继 https://facebook.github.io/relay/docs/en/mutations.html.

Check 了解中继突变 https://github.com/chrisbolin/understanding-relay-mutations为了更好的解释。

clientMutationId。该 ID 由 Relay 客户端在后台生成,用于跟踪突变的进度。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

github graphql api,“clientMutationId”是什么意思? 的相关文章

随机推荐