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

MutationOptions support for the commerce-sdk-react mutation hooks #2155

Open
daniel-delatorre-xplore opened this issue Dec 2, 2024 · 0 comments

Comments

@daniel-delatorre-xplore
Copy link

Is your feature request related to a problem? Please describe.
At this moment is not possible to specify any mutationOption(retry, retryDelay, etc..) for the commerce-sdk-react mutations hooks

Describe the solution you'd like
I would like to add a new parameter in each mutation hook method to pass the mutationOptions

Describe alternatives you've considered
The other alternative a consider was to use the commerce-sdk-isomorphic to use the mutation with the mutationOptions but then I would have to implement the cache invalidation done for every mutation from the commerce-sdk-react

Additional context
In our current pwa-kit checkout implementation we have combined the shipping, billing and shipping method steps in one single step, but since there is no mutation to update the basket with the 3 elements at the same time we need to do 3 independent submits. Since this is not atomic and any of the request could fail we wanted to create some retry mechanism just in case

@daniel-delatorre-xplore daniel-delatorre-xplore changed the title MutationOptions support for the commerce-sdk-react mutations hooks MutationOptions support for the commerce-sdk-react mutation hooks Dec 2, 2024
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

No branches or pull requests

1 participant