Skip to content
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

Merged
merged 10 commits into from
Oct 28, 2022
Merged

Fill out v1.9 remaining docs #2804

merged 10 commits into from
Oct 28, 2022

Conversation

markerikson
Copy link
Collaborator

@markerikson markerikson commented Oct 21, 2022

This PR:

  • Updates Yarn to 3.2.4, as 3.1.0 didn't want to install an updated Docusaurus properly
  • Updates Docusaurus to 2.1.0
  • Exports defaultSerializeQueryArgs for now
  • Documents the new RTKQ endpoint fields
  • Documents the new fetchBaseQuery args and reworks that page in general
  • Adds a page for "Codemods"

Fixes #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 the serializeQueryArgs 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 how serializeQueryArgs works now and realized we don't export that.

@codesandbox
Copy link

codesandbox bot commented Oct 21, 2022

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 21, 2022

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:

Sandbox Source
Vanilla Configuration
Vanilla Typescript Configuration
rsk-github-issues-example Configuration
@examples-query-react/basic Configuration
@examples-query-react/advanced Configuration
@examples-action-listener/counter Configuration


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.
Copy link

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)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ggaabe : no, it would replace the .data field with undefined. It's the value, not the key.

There isn't currently a way to remove one, but a few folks have asked for something like this. Could you comment over in #2820 and describe when and why you might want to do that?

@markerikson markerikson marked this pull request as ready for review October 26, 2022 03:44
@markerikson
Copy link
Collaborator Author

Docs should be updated, pending me figuring out what to do with the defaultSerializeQueryArgs thing

@markerikson
Copy link
Collaborator Author

Odd, no PR preview.

We'll, let's get it in.

@markerikson markerikson merged commit e0a8bd5 into v1.9-integration Oct 28, 2022
@markerikson markerikson deleted the docs/v1.9-docs branch October 28, 2022 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants