Thanks @Fares!
Hi @Fares. Thanks for keeping us in the loop. I see the update for apollo-link-prismic
was pushed. We bumped the dep on our end but unfortunately still have this issue.
@paul4 Thanks for reporting that, our developers are looking into it.
@Fares I believe we're running into this issue as well.
Some more context on our situation: We are NOT using apollo-link-prismic
but are seeing stale responses coming from the GraphQL API. We're fetching the master ref before every request and passing that along with our graph query. We are using Apollo's client library, and I have verified we are not hitting an in memory cache, the response indicates the source as coming from the server. Our app is a native iOS app. As @secure mentioned also, it seems this problem only started recently.
UPDATE: We believe we found the root cause of our issue to be that because Prismic uses GET for graph queries, iOS was writing the response to disk, and not to the in memory cache. We have 2 graph clients, one that uses the more traditional POST for queries, and Prismic using GET which made the debugging of this issue a little more tricky.
Thanks, @mike2 for reporting the issue and the potential cause in IOS, I have followed up with our developers about this, but still, this doesn't explain the initial issue reported here.
I think it's similar @Fares, the response being written to disk and then being served from there, rather than latest one from server. Disabling the in memory cache doesn't fix it. This seems to be the case both on our website, and the react native app we're building.
Hi @secure, can you please clarify the two applications you have? I understand that one of the applications is a react-native android app, but what about the other application?
The react native app is android and iOS, then it's our website (which is Next.js)
Thanks for the response. I don't understand how your React application with Next.js is having the issue. Does it also write the response to the disk?
In the sense that the browser automatically caches the response, which is similar to what is happening in the react-native apps as well I imagine. Sorry, that part of the site is "vanilla" react, not Next.js specifically (it's a bit of a weird setup...)
Hi @Prismic-Support-Team, anyone else able to provide an update in Fares' absence? More people complaining on the GitHub issue
The team published an alpha version ( v1.1.1-alpha.0
), can you try this out to see if it works?
npm i apollo-link-prismic@1.1.1-alpha.0
Yep, that seems to fix it, thanks!
Awesome
@Phil do you know when that will get merged into an actual release?
The fix has been published in the latest version, v1.1.1
Got it, thanks!