[FEATURE REQUEST] Global naming convention
See original GitHub issueWith the introduction of the Custom GraphQL Root Fields and GraphQL Field Name features, one can specify the name used in the schema generation, for every field and table. This is very useful, especially, when referencing from client apps. But, this might become overhead for very large schemas, spanning across multiple Postgres schemas.
I would like to see a feature where one can specify the naming convention globally (perhaps at a schema level?), e.g. camelCase, PascalCase, etc.
This should be available for table names, field names, mutation names and relationship names.
Bonus Request:
- Would be even more amazing if we could define additional text to the naming convention, e.g. insert mutations:
'add'${PascalCase table name}
- Also be able to specify singular or plural in the convention, e.g. by_pk query name:
${singular camelCase table name}
and normal select query:${plural camelCase table name}
Issue Analytics
- State:
- Created 4 years ago
- Reactions:155
- Comments:29 (6 by maintainers)
Top Results From Across the Web
Guide on data entity naming conventions - GovInfo
To this end, the Bureau conductsresearch to assure international competitiveness and ... is to require uniqueness of every entry name in the dictionary....
Read more >Naming conventions | Cloud APIs
The request and response messages for RPC methods should be named after the method names with the suffix Request and Response , respectively,...
Read more >Define your naming convention - Cloud Adoption Framework
An effective naming convention consists of resource names from important information about each resource. A good name helps you quickly ...
Read more >Style guide - GitLab Docs
Style guide. This document describes various guidelines and best practices for GitLab Helm chart development. Naming Conventions.
Read more >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 >
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
As a JavaScript developer, I really want this feature.
For most users this customisation probably wouldn’t be needed if Hasura would transform all table/column/relation names to GraphQL conventions automatically the same way that Postgraphile does it: https://www.graphile.org/postgraphile/inflection/
On one hand it’s nice that you can rename all fields by yourself, but on the other it is frustrating that you’re still stuck to the GraphQL type names that Hasura generates from tacked tables. For example, I now have camelCase fields but snake_case types and can’t find any option to rename those types apart from defining new custom types.
The whole customization shouldn’t even be necessary in the first place. I think it’s a “nice to have”, but more importantly, Hasura should apply common GraphQL conventions automatically or via a checkbox when you’re about to track new tables. This is something that I, as a new user, miss by far the most after a few days playing around with Hasura.