-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add endpoint
, type
and forced
to BaseQueryApi
and prepareHeaders
#1656
Conversation
(Number(new Date()) - Number(fulfilledVal)) / 1000 >= refetchVal | ||
) | ||
} | ||
if (fulfilledVal) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved that out to also be able to call it elsewhere. Could someone (@msutkowski you were working on this with me?) please verify that I didn't break the logic?
size-limit report 📦
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 09e4306:
|
@@ -71,36 +72,27 @@ const authSlice = createSlice({ | |||
const storeRef = setupApiStore(api, { auth: authSlice.reducer }) | |||
type RootState = ReturnType<typeof storeRef.store.getState> | |||
|
|||
const defaultBaseQueryApi: BaseQueryApi = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be a callback, as otherwise all tests will refer storeRef.store
from before the first test as the stale reference will not pick up the store replacement between tests.
This still needs tests & adjustments for existing tests.
It should unlock quite some behavior around
Cache-Control
headers.