Closed hunterwilhelm closed 1 month ago
The root cause of this can be attributed to #28 as well as the fact that the heuristic currently does not perform any of the following checks:
useMutation/a/b/c
.useMutation
specifically here, so maybe I can just modify that.Would you have any thoughts? I think I could go with option 3 for the moment.
I think that is a valid approach. I am exploring options in my fork as I make the eden-vue-query
adapter.
So far I found that in treaty/index.ts
in createEdenTreatyVueQueryProxy
, changing if (pathParam?.key != null)
to if (pathParam?.key != null && pathParam.key !== 'onSuccess')
provides a band-aid solution for what I want to do.
However, I don't consider it a permanent solution because we would have to check for all possible options on it. So, I'll keep you posted with what I find to fix this.
Thanks so much for considering contributing, let me know if there's any way I could help!
I apologize for the lack of additional developer assistance; I think I wrote a blog about how the type system generally works on the svelte-query readme.
Adding
onSuccess
property in example ofuseMutation
throwsTypeError: rootHooks[hook] is not a function
Steps to reproduce
Change addTodo in
eden-query/examples/eden-react-query-basic/src/routes/mutation/+page.tsx
to this:I get the following error on
index.ts:275