Skip to content

Apollo#382

Closed
RudyWeber wants to merge 7 commits intomasterfrom
add-apollo-grapghql-react
Closed

Apollo#382
RudyWeber wants to merge 7 commits intomasterfrom
add-apollo-grapghql-react

Conversation

@RudyWeber
Copy link
Copy Markdown
Contributor

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.

Comment thread templates/apollo-graphql-react/files/.gitignore Outdated
Comment thread templates/apollo-graphql-react/.platform.template.yaml Outdated
Comment thread templates/apollo-graphql-react/.platform.template.yaml Outdated

"https://api.{default}/":
type: upstream
id: graphqlEntrypoint
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think IDs are supposed to be lowercase, no? We generally use kebab case for these.

Suggested change
id: graphqlEntrypoint
id: graphql-entrypoint

Though I admit I detest the word "entrypoint". It's such a meaningless buzzword.

Copy link
Copy Markdown
Contributor Author

@RudyWeber RudyWeber Dec 1, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread templates/apollo-graphql-react/files/.platform/services.yaml Outdated
Comment thread templates/apollo-graphql-react/files/README.md Outdated
Comment thread templates/apollo-graphql-react/.platform.template.yaml Outdated
Comment thread templates/apollo-graphql-react/files/back/.platform.app.yaml Outdated
Comment thread templates/apollo-graphql-react/files/back/src/resolvers/pubsub.js Outdated
Co-authored-by: Larry Garfield <larry@platform.sh>
Comment thread templates/apollo-graphql-react/files/back/src/resolvers/query.js
Comment thread templates/apollo-graphql-react/files/back/src/resolvers/query.js Outdated
@chadwcarlson chadwcarlson changed the title add apollo graphql react template Apollo Oct 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants