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

fix(medusa-react): Allow to not invalidate any cache #1756

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

adrien2p
Copy link
Member

What

At the moment, it is not possible to not invalidate any queries>
Example, when we want to Create a new signed url, it does not require to invalidate any of the queries.
But the way it is done in the buildOptions, require to give either a key or an array of keys.

How

The behaviour for empty array is to invalidate all the queries and here we would like to be able to just pass undefined in order to not trigger the invalidation. The update allow the arg to be optional and check for undefined explicitly before choosing the invalidation

@adrien2p adrien2p requested a review from a team as a code owner June 30, 2022 08:48
@adrien2p adrien2p requested review from pKorsholm and fPolic June 30, 2022 08:49
Copy link
Collaborator

@srindom srindom left a comment

Choose a reason for hiding this comment

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

LGTM

@kodiakhq kodiakhq bot merged commit 9e0f65d into develop Jun 30, 2022
@kodiakhq kodiakhq bot deleted the fix/medusa-react-query-invalidation branch June 30, 2022 09:03
SGFGOV pushed a commit to SGFGOV/medusa that referenced this pull request Jul 1, 2022
### What
At the moment, it is not possible to not invalidate any queries>
Example, when we want to Create a new signed url, it does not require to invalidate any of the queries.
But the way it is done in the buildOptions, require to give either a key or an array of keys. 

### How
The behaviour for empty array is to invalidate all the queries and here we would like to be able to just pass undefined in order to not trigger the invalidation. The update allow the arg to be optional and check for undefined explicitly before choosing the invalidation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants