-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Example: Add with-relay #33892
Example: Add with-relay #33892
Conversation
543b5ce
to
d042230
Compare
This looks cool! What do you think about making just one example: |
Just to note if this ever gets shipped: I pulled your PR and was getting hydration errors in the initial launch. These errors go away when I go to another page and comes back, thus I suspect it has something to do with some mismatch in the initial launch. Not familiar enough with Relay to give more help unfortunately :(. Other side note is that the relay-modern example seems to be busted, I'm getting missing fragment errors on initial start-up. So I think deleting it and replacing it with this one would be a much cleaner approach for n00bs like me. |
d042230
to
3a633f3
Compare
08e5977
to
cb4fe99
Compare
@dylanOshima I've fixed those hydration errors: It was my fault for rendering a @alunyov Good idea! I've removed I've also expanded the example to include lazy loading & render-as-you-fetch with |
cb4fe99
to
266b951
Compare
Would be nice to have this merged as a reference, it's confusing out there between outdated |
@@ -1,49 +0,0 @@ | |||
# Relay Modern Example |
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.
Let's not delete this file and rather mention that this example is now moved.
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.
I find this counter productive. It's will only add more confusion to new comers now that "relay modern" is just "relay".
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.
The reason we don't want to remove old examples is that there might exist a lot of links out there that still point to that location. We want the developer to know that the example has moved.
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.
So remove all the example code, but leave a single README with a link to the new example?
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.
Correct 👍
df8579c
to
47e5ebe
Compare
e078ebe
to
6b863fe
Compare
Closing as stale – if you would like to continue this, please open a new PR and we can take a look. Thank you so much! 🙏 |
Adds
examples/with-relay
which uses the latest version of Relay known as "Relay Hooks".Relay Modern is now (ironically?) out of date. I have removed the existing
examples/with-relay-modern
example as per @alunyov's suggestion to avoid confusion.Note that I have used the SWAPI GraphQL API in
with-relay
. This differs from the other examples (with-apollo
,with-relay-modern
, etc) which use the Prisma example GraphQL API because I was getting errors when attempting to query it: prisma-labs/nextjs-graphql-api-examples#4Documentation / Examples
yarn lint