Graphql 禁用apollo rest参数camelCase转换

Graphql 禁用apollo rest参数camelCase转换,graphql,apollo,apollo-client,Graphql,Apollo,Apollo Client,Apollo客户端将rest参数转换为snake_大小写。如何禁用它 这是我的突变: import gql from 'graphql-tag' export const CREATE = gql` mutation create( $name: String $email: String ) { account(input: { fields: [ { field

Apollo客户端将rest参数转换为snake_大小写。如何禁用它

这是我的突变:

import gql from 'graphql-tag'

      export const CREATE = gql`
      mutation create(
        $name: String
        $email: String
      ) {
        account(input: { fields: [
          { 
            fieldId: name
            value: $name
          },
          { 
            fieldId: email
            value: $email
          }
        ] 
        })
          @rest(
            type: "gateway"
            path: "/auth/gateway/create"
            method: "POST"
          ) {
          __typename
        }
      }
    `
其中,
fieldId
转换为
field\u id
。我需要使用camelCase格式。

您可以找到一个with
fieldNameDenormalizer
参数。您需要将
fieldNameDenormalizer:$requestLevelDenormalizer
添加到mutation中,并将
requestLevelDenormalizer
定义为将字符串转换为大小写的函数