Uses the relay compiler to generate next.js API routes by abusing the "persistConfig". The generated API routes will check that the variables are allowed and only allow the whitelisted variables to be used in the query.
Upgrades next.js and Relay to fix a pagination issue on the root page.
Once you have the token, add it to a new environment variable called GITHUB_TOKEN. Then you should be able to deploy.
A couple of things we lose without OneGraph:
No fallback when the GitHub API goes down. We may be able to get that back with the next.js fetch cache. I also have an idea around using res.revalidate() which would let us set cache-control headers far into the future.
No support for mutations (but you weren't using those anyway)
Uses the relay compiler to generate next.js API routes by abusing the "persistConfig". The generated API routes will check that the variables are allowed and only allow the whitelisted variables to be used in the query.
Upgrades next.js and Relay to fix a pagination issue on the root page.
Now that we're not hitting OneGraph, it will require a GitHub token, which you can get from https://github.com/settings/tokens.
The token only needs the "public_repo" scope.
Once you have the token, add it to a new environment variable called
GITHUB_TOKEN
. Then you should be able to deploy.A couple of things we lose without OneGraph:
res.revalidate()
which would let us set cache-control headers far into the future.You can see it in action here: https://stopablog-next-test-jacv50mzh-dwwoelfel.vercel.app/post/296