posva / pinia-colada

🍹 The smart data fetching layer for Pinia
https://pinia-colada.esm.dev/
MIT License
761 stars 10 forks source link

Add a `key` option to mutations that is optional #16

Closed posva closed 5 months ago

posva commented 6 months ago

This will allow later on to retrieve mutation state, cancel ongoing mutations etc. By default mutations have no key and cannot be "reused"

ElisePatrikainen commented 6 months ago

Should the mutation key option have the same type as the query key option (apart from the fact it is optional)? If yes, should we create a mutualized type (UseKey for example, which would be used for mutation and query keys)?

posva commented 6 months ago

yeah, it could be mutualized into an EntryKey

ElisePatrikainen commented 6 months ago

Ok, thank you.