-
Notifications
You must be signed in to change notification settings - Fork 26.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add an example with graphql-react #5984
Conversation
"dependencies": { | ||
"cross-fetch": "^3.0.0", | ||
"graphql-react": "^6.0.0", | ||
"next": "^7.0.0", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably use latest
like the other examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the time I surveyed the examples and noticed about 17 don't use latest
for the next
dependency. This is a good thing, since examples are not guaranteed to work when (not if) breaking changes to next
are published in a major version.
There are almost no valid use cases for *
or latest
. Inexperienced people that download and run examples locally are likely to use them as a boilerplate for their own projects, and they will not know that latest
is risky anti-pattern that will eventually blow up their project.
When the next major version of next
is published I will be sure to publish a new version of next-graphql-react
that supports it, with an updated peer-dependency range, and update the dependency in the example here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seeing the major version of next
supported by each example in package.json
is also useful, as when a major new version is published not every example is guaranteed to work on day 1. It lets you know how up to date the example and the third-party projects are.
I've pulled in the latest from |
Thanks! |
Add an example with graphql-react (vercel#5984)
Adds an example with
graphql-react
, usingnext-graphql-react
.graphql-react
is a lightweight but powerful GraphQL client for React; the first Relay and Apollo alternative with server side rendering.