typed-document-node: camelCase exports by default?
See original GitHub issueFirst of all, thank you for this amazing plugin!
By default it generates TypedDocumentNodes in PascalCase
. While it makes sense for all generated TypeScript types, it probably should be camelCase
for nodes as they are values rather than types. For example, typescript-react-apollo
generates functions that start with lowercase letters.
There’s a config option namingConvention
, but setting it to change-case-all#camelCase
changes the case of types as well, which is not what we’re looking for.
It also looks like omitOperationSuffix
property doesn’t work. Ideally, I would like to see the following being generated:
export const getUserQuery = ...;
export const deleteUserMutation = ...;
Is there a config property I’m missing?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Naming Convention - GraphQL Code Generator
You need to provide a CJS module with a default export of a function that takes a string and returns a string. The...
Read more >Naming Conventions · Styleguide JavaScript
Use camelCase when using export default for a function. The filename should be identical to your function's name. Examples. ⇣ Incorrect code for...
Read more >apollo-typed-documents - npm
... export default authors; } declare module "*/createAuthor.graphql" { import { TypedDocumentNode } from "apollo-typed-documents"; ...
Read more >Attribution - Sandtime.io
... @babel/plugin-proposal-dynamic-import · @babel/plugin-proposal-export-default-from · @babel/plugin-proposal-export-namespace-from ...
Read more >License info, alfresco-ng2-components 5.1.0
Name Version License
@alfresco/js‑api 5.1.0‑384 Apache‑2.0
@angular/animations 14.1.3 MIT
@angular/cdk 14.1.2 MIT
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
@A-Shleifman Can you send a PR with failing tests for
omitOperationSuffix
?Hi! This issue is specific to codegen and not to this repo. I’m moving it.