-
Notifications
You must be signed in to change notification settings - Fork 3
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
Cache GraphQL Queries #508
Conversation
@n1ckoates is attempting to deploy a commit to the Lifeworld Team on Vercel. A member of the Team first needs to authorize it. |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi @n1ckoates thank you for introducing these changes! Locally and on the preview deploy I'm encountering an issue that stems from the adjustments made to The other thing I wanted to ask if there was any documentation you could please point me to surrounding the change made to |
@salieflewis I didn't realize The I wasn't able to setup a local dev environment, so I was mostly just relying on the Vercel preview. I couldn't find instructions on how to do that here ( |
I've got to update our contribution guidelines, but yeah for the time being working off the preview deploy makes sense. Configuring a local environment without sharing a ton of API keys would still be quite difficult at this time. And that is interesting about gql request, thanks for sharing. |
Nick, I added your email The reason I'm saying this is because I'm still experiencing complications surrounding I recognize not having a local dev environment is a large barrier for contributions. We're working on mitigating this. Thanks for your patience with this. cc: @n1ckoates |
If it doesn't have any sensitive details in it, could you share the error here? Also, could any of the variables in |
Here is the error. It is getting bubble up because of changes to |
Hey @n1ckoates wanted to follow up with you about this. I think the last remaining thing is reverting the changes to |
Reverted those changes just now. Sorry for the delay! |
No worries! Approving the deployments now. |
This pull request wraps each GraphQL query with Next.js' (
unstable_cache
)[https://nextjs.org/docs/app/api-reference/functions/unstable_cache] API, which caches the responses of those functions. This should significantly speed up queries (and thus the frontend interface).I also configured
graphql-request
to use the patched version offetch
which itself includes caching logic.