[openapi-fetch] How to *always* use the global fetch #1927
Unanswered
michael-wolfenden
asked this question in
Q&A
Replies: 1 comment
-
Just curious, because I also have MSW set up in my project and I just added openapi-ts, is this only an issue with HMR? Hopefully refreshing will update everything? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using
openapi-fetch
withRemix
andMSW
.When using HMR to restart MSW when the mock handlers change,
openapi-fetch
does not pickup the changes. I'm assuming this is becausefetch
is cached increateClient
.I tried adding a middleware to set fetch for each request, however the options are frozen and therefore read-only,
My current workaround is to add a wrapper for each http method
Is there a better way?
Beta Was this translation helpful? Give feedback.
All reactions