Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK: naming convention transform camelCase not working for inputTypes #565

Closed
durdenx opened this issue Jun 10, 2020 · 5 comments
Closed
Labels
bug Something isn't working transforms

Comments

@durdenx
Copy link

durdenx commented Jun 10, 2020

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.

If we use:

transforms:
      - namingConvention:
          fieldNames: camelCase

the following query :

sdk.groupsQuery({ input: { perPage: 5 } });

return an error:

GraphQLError: Variable "$input" got invalid value { perPage: 1 }; Field "perPage" is not defined by type GroupsInput. Did you mean per_page or page?

if we use graphql-mesh serve it's working.

@ardatan ardatan added the bug Something isn't working label Jun 10, 2020
@ardatan
Copy link
Owner

ardatan commented Jun 10, 2020

@durdenx Could you share a reproduction on CodeSandbox or a GitHub repo?

@durdenx
Copy link
Author

durdenx commented Jun 11, 2020

@ardatan You can find a reproduction here: https://github.com/durdenx/graphql-mesh-json-schema

@ardatan
Copy link
Owner

ardatan commented Jun 15, 2020

Available in https://github.com/Urigo/graphql-mesh/releases/tag/v0.2.11

@ardatan ardatan closed this as completed Jun 15, 2020
@durdenx
Copy link
Author

durdenx commented Jun 17, 2020

I've upgraded to v2.11 and the problem is still there : https://github.com/durdenx/graphql-mesh-json-schema

@ardatan
Copy link
Owner

ardatan commented Mar 31, 2023

It seems to be working fine since SDK is generated in a different way now. Let us know if the issue persists so we can reopen the issue.

@ardatan ardatan closed this as completed Mar 31, 2023
This was referenced Apr 30, 2024
This was referenced May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working transforms
Projects
None yet
Development

No branches or pull requests

2 participants