urql icon indicating copy to clipboard operation
urql copied to clipboard

requestPolicyExchange does not re-request in production

Open Yama-Tomo opened this issue 1 year ago • 3 comments

Describe the bug

TTL-based re-request occurs in development mode but not in production. I created a repository for reproduction. You can try each with yarn dev and yarn prod.

Reproduction

https://github.com/Yama-Tomo/request-policy-exchange-bug

Urql version

Validations

  • [X] I can confirm that this is a bug report, and not a feature request, RFC, question, or discussion, for which GitHub Discussions should be used
  • [X] Read the docs.
  • [X] Follow our Code of Conduct

Yama-Tomo avatar Feb 18 '24 02:02 Yama-Tomo

This sounds like a duplicate of #3462.

So, I'm not convinced your core version is accurate here in your report. Does that sound about right? https://github.com/urql-graphql/urql/pull/3464

kitten avatar Feb 18 '24 05:02 kitten

yes. The repository for reproduction uses version 4.2.3

Yama-Tomo avatar Feb 18 '24 07:02 Yama-Tomo

Looks like you are right, it was fixed in #3464. However, the code published in npm doesn't seem to have it added :thinking: (I patched it to 4.2.3 and it works.)

This may have affected. https://github.com/urql-graphql/urql/blob/87c4bd95631d83e4f33e23fcf066b73aeae5a768/scripts/babel/transform-debug-target.mjs#L47-L52

Yama-Tomo avatar Feb 20 '24 08:02 Yama-Tomo