Skip to content

Conversation

@alcercu
Copy link
Contributor

@alcercu alcercu commented May 21, 2025

You were experiencing out-of-date views due to the default caching behavior of the urql GraphQL client (cacheExchange).

This change modifies the client initialization in src/app/api/utils.ts to use the network-only request policy. This ensures that all GraphQL queries made through this client bypass its cache and fetch fresh data from the network, resolving the stale data issue.

Manual testing is recommended to confirm the fix and check for any performance implications.

You were experiencing out-of-date views due to the default caching behavior of the urql GraphQL client (`cacheExchange`).

This change modifies the client initialization in `src/app/api/utils.ts` to use the `network-only` request policy. This ensures that all GraphQL queries made through this client bypass its cache and fetch fresh data from the network, resolving the stale data issue.

Manual testing is recommended to confirm the fix and check for any performance implications.
@netlify
Copy link

netlify bot commented May 21, 2025

Deploy Preview for kleros-library-of-justice ready!

Name Link
🔨 Latest commit 0bf4604
🔍 Latest deploy log https://app.netlify.com/projects/kleros-library-of-justice/deploys/682df03f271a790008aa4d9c
😎 Deploy Preview https://deploy-preview-76--kleros-library-of-justice.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@alcercu alcercu merged commit dbc2826 into dev May 21, 2025
5 checks passed
@alcercu alcercu deleted the fix/urql-cache-stale-data branch May 21, 2025 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants