Skip to content

durdenx/graphql-mesh-json-schema

 
 

Repository files navigation

SDK: naming convention transform camelCase not working for inputTypes

Bug description

When we use the new naming convention transform with the SDK to transform snake_case types in camelCase, renamed input fields are not well binded with their corresponding snake_case fields.

 transforms:
  - namingConvention:
      fieldNames: camelCase

To reproduce

yarn install
yarn generate:sdk
yarn server:start
yarn client:start

errors

GraphQLError: Variable "$input" got invalid value { username: "jdoe", firstName: "John", lastName: "Doe", email: "[email protected]" }; Field "firstName" is not defined by type UserInput. Did you mean first_name or last_name?
Variable "$input" got invalid value { username: "jdoe", firstName: "John", lastName: "Doe", email: "[email protected]" }; Field "lastName" is not defined by type UserInput. Did you mean last_name, username, or first_name?
(node:9900) UnhandledPromiseRejectionWarning: Error: GraphQL Mesh SDK Failed (1 errors): Variable "$input" got invalid value { username: "jdoe", firstName: "John", lastName: "Doe", email: "[email protected]" }; Field "firstName" is not defined by type UserInput. Did you mean first_name or last_name?
Variable "$input" got invalid value { username: "jdoe", firstName: "John", lastName: "Doe", email: "[email protected]" }; Field "lastName" is not defined by type UserInput. Did you mean last_name, username, or first_name?

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 100.0%