Naming convention of types
See original GitHub issueI am unsure whether or not I have missed a configuration step, but my generated types for arrays is looking like this after upgrading to 0.14.1:
export namespace GetMachinesForFleetInventory {
export type Variables = {};
export type Query = {
__typename?: "Query";
machines: Machines[] | null;
};
export type Machines = {
__typename?: "Machine";
id: number;
model: string | null;
category: string | null;
brand: string | null;
productionDate: Date | null;
};
}
I would really want Machines[]
to be Machine[]
(the __typename
), as working with them in singular form.
Is there a configuration for this? 😃
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Naming convention (programming) - Wikipedia
In computer programming, a naming convention is a set of rules for choosing the character sequence to be used for identifiers which denote...
Read more >Coding best practices
Variable Naming Conventions¶. Variable naming is an important aspect in making your code readable. Naming variables follow a simple idea: Create variables that ......
Read more >Programming Naming Conventions – Camel, Snake, Kebab ...
What are Naming Conventions in Programming? · Camel Case · Snake Case · Kebab Case · Pascal Case.
Read more >Naming Conventions - Devopedia
In general, use nouns for classes, verbs for functions, and names that show purpose for variables, attributes and arguments. Avoid (Systems) ...
Read more >9. Naming Conventions - Oracle
9 - Naming Conventions ; Classes, Class names should be nouns, in mixed case with the first letter of each internal word capitalized....
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 FreeTop 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
Top GitHub Comments
I can see why the codegen does this, and maybe I just need to adjust my mind to this naming.
I guess I am just used to have a
Machine
and when its an array itsMachine[]
. So the__typename
is the one defining the type 😃@dotansimha Thanks for your work! 😃
New version, new problems. See #1535