`client-preset` doesn't take into account `namingConvention`
See original GitHub issueDescribe the bug
When using the client-preset
, if I add namingConvention
config it won’t be taken into account in the “types”. It is however applied to the “documents”.
Your Example Website or App
Not public
Steps to Reproduce the Bug or Issue
- Use the following config: Config used to reproduce
import type { CodegenConfig } from '@graphql-codegen/cli';
const config: CodegenConfig = {
overwrite: true,
schema: 'http://localhost:8080/api/graphql',
documents: ['src/**/*.{ts,tsx}', '!src/gql/**/*'],
generates: {
'src/gql': {
preset: 'client',
plugins: [],
},
},
config: { namingConvention: 'change-case-all#upperCase' },
};
export default config;
- Run the codegen
- Types case doesn’t match the config in
src/gql/graphql
Expected behavior
namingConvention
should be taken into account
Screenshots or Videos
No response
Platform
- OS: all
- NodeJS: v14
graphql
version: 16.6.0- “@graphql-codegen/cli”: “2.13.2”,
- “@graphql-codegen/client-preset”: “1.0.2”,
Codegen Config File
{
overwrite: true,
schema: 'http://localhost:8080/api/graphql',
documents: ['src/**/*.{ts,tsx}', '!src/gql/**/*'],
generates: {
'src/gql': {
preset: 'client',
plugins: [],
},
},
config: { namingConvention: 'change-case-all#upperCase' },
}
Additional context
It seems to be because options.config
isn’t passed down here: https://github.com/dotansimha/graphql-code-generator/blob/f3c5b7a0044a0618898676ee6ee06f2494ac0b7c/packages/presets/client/src/index.ts#L177
Issue Analytics
- State:
- Created a year ago
- Comments:5
Top Results From Across the Web
Enforce group naming policy in Azure Active Directory
To enforce consistent naming conventions for Microsoft 365 groups created or edited by your users, set up a group naming policy for your ......
Read more >Naming Conventions: Best Practices for Documentation - IT Glue
In this blog, we'll explore the significance of structured naming convention and how to use it to organize and retrieve documents ...
Read more >Service naming rules | Dynatrace Docs
In the Dynatrace menu, go to Settings > Server-side service monitoring > Service naming rules and scroll to the Built-in rules section.
Read more >Client printers policy settings - Citrix Product Documentation
Client printer names This setting selects the naming convention for auto-created client printers. By default, standard printer names are used. ...
Read more >Change Server Settings in Mail on Mac - Apple Support
Use Server Settings settings in Mail to change options for an account's incoming and outgoing (SMTP) mail servers. To change these settings in...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Hugodby, good catch, fixed in
@graphql-codegen/client-preset@1.0.5
📦You are so fast thank you! I just tested and it works now!