Why labels used instead of slugs for typescript and graphql? #1343
-
That was unexpected - declared tone of configs, wrote tone of graphql queries in nextjs pages using generated types and decided its time for cleanup ui in CMS - and boom - everything broken as i changed labels 🤪 I even checked - you have Settings in group One and Settings in group Two - it will make Settings and Settings1 instead of used slugs. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
This is about to improve actually - very shortly. At first we did this because labels generally aligned more closely to naming conventions of GraphQL types but I agree, it’s not expected. Keep an eye out for more here shortly |
Beta Was this translation helpful? Give feedback.
-
You're absolutely right @itspers, I've made this change and included it in the PR for i18n. #1326 Going forward, slugs will be responsible for graphQL schema names by default. If you wish to override the names Payload derives from the slug, you can be explicit using the new properties on Collections and Globals to do so. Collections new object for GraphQL is: graphQL?: {
singularName?: string
pluralName?: string
} and globals has a new property for The change is still open for review if you have any comments. |
Beta Was this translation helpful? Give feedback.
-
These changes were released in v1.2. |
Beta Was this translation helpful? Give feedback.
These changes were released in v1.2.