-
-
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
Fill out v1.9 remaining docs #2804
Conversation
Open in CodeSandbox Web Editor | VS Code | VS Code Insiders |
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 6763f7b:
|
|
||
The thunk action creator accepts three arguments: the name of the endpoint we are updating (such as `'getPost'`), the appropriate query arg values to construct the desired cache key, and the data to upsert. | ||
|
||
If no cache entry for that cache key exists, a cache entry will be created and the data added. If a cache entry already exists, this will _overwrite_ the existing cache entry data. |
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.
If the value being upserted is undefined
, will it remove the cache key entirely? If not, is there a way to remove a cache entry entirely? (ie, like invalidateTags
, but without triggering a refetch)
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.
Docs should be updated, pending me figuring out what to do with the |
Odd, no PR preview. We'll, let's get it in. |
This PR:
defaultSerializeQueryArgs
for nowfetchBaseQuery
args and reworks that page in generalFixes #2619 , or will once I'm done with it.
I'm most likely going to move the
defaultSerializeQueryArgs
export to its own branch, and also see about changing theserializeQueryArgs
endpoint option to let you just return a non-string value if you want, but put it here for now because I needed to show an example of howserializeQueryArgs
works now and realized we don't export that.