Conversation
|
|
||
| "https://api.{default}/": | ||
| type: upstream | ||
| id: graphqlEntrypoint |
There was a problem hiding this comment.
I think IDs are supposed to be lowercase, no? We generally use kebab case for these.
| id: graphqlEntrypoint | |
| id: graphql-entrypoint |
Though I admit I detest the word "entrypoint". It's such a meaningless buzzword.
There was a problem hiding this comment.
The documentation doesn't specify the ID format explicitly, although the provided example is in kebab case, indeed. IDs being strings, it shouldn't change anything no matter what convention is used?
In JavaScript, camelCase is preferred. This mainly comes from the fact that identifiers can't contain dashes. Regarding object keys with special characters, they can be accessed using the bracket notation: obj["key-with-special-chars"], which is less convenient than the dot notation: obj.keyWithoutSpecialChars.
So to keep things consistent, I like having everything the same rather than wondering what typographical convention a value (that I have control over) uses.
If there are strong feelings about having ID values in camelCase, I'll change to kebab-case and adapt the code accordingly.
Co-authored-by: Larry Garfield <larry@platform.sh>
Co-authored-by: Larry Garfield <larry@platform.sh>
https://github.com/platformsh-templates/apollo-graphql-react/pull/1
For the Front app, it'd be better if we could have platformsh/config-reader-nodejs#17 merged.
In this example, it is vendored so I can use this feature.