urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.54k stars 444 forks source link

requestPolicyExchange does not re-request in production #3508

Closed Yama-Tomo closed 4 months ago

Yama-Tomo commented 4 months ago

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

kitten commented 4 months ago

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

Yama-Tomo commented 4 months ago

yes. The repository for reproduction uses version 4.2.3

Yama-Tomo commented 4 months ago

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