Skip to content

Fix mutation hooks mutationMode option cannot be controlled#10809

Closed
djhi wants to merge 4 commits intomasterfrom
mutations-controlled-mutationmode
Closed

Fix mutation hooks mutationMode option cannot be controlled#10809
djhi wants to merge 4 commits intomasterfrom
mutations-controlled-mutationmode

Conversation

@djhi
Copy link
Copy Markdown
Contributor

@djhi djhi commented Jun 27, 2025

Problem

All our mutation hooks accepts a mutationMode option. However, if this option dynamically changes, the changes will be ignored. This is because we store the initial value in a useRef but never update it.

How To Test

  • stories
  • unit tests

Todo

  • useCreate
  • useDelete
  • useDeleteMany
  • useUpdate
  • useUpdateMany

Additional Checks

  • The PR targets master for a bugfix or a documentation fix, or next for a feature
  • The PR includes unit tests (if not possible, describe why)
  • The PR includes one or several stories (if not possible, describe why)
  • The documentation is up to date

Also, please make sure to read the contributing guidelines.

@djhi
Copy link
Copy Markdown
Contributor Author

djhi commented Jun 30, 2025

Closing this as we already allow to pass different mutationMode and params at call time.

@djhi djhi closed this Jun 30, 2025
@djhi djhi deleted the mutations-controlled-mutationmode branch June 30, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work In Progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant