lukemorales/query-key-factory

createMutationKeys with schema does not expose type mutationFn like the createQueryKeys function does

siteassist-benjamin opened this issue · 1 comments

We need to access and reuse the mutationFn from one of the mutationKeys definitions. However the only property exposed by the library for createMutationKeys is the mutationKey.

This is not a problem with the createQueryKeys function - see examples below:

Screenshot 2023-05-15 at 12 07 14
Screenshot 2023-05-15 at 12 07 04

I have tried looking into where this would need to change but I am a little lost as the typing system is very complex. Any help would be deeply appreciated 🙏

@siteassist-benjamin the createMutationKeys types are in fact broken, it's a now issue #55 but I didn't have the time yet to fix it. I'll just close the issue as a duplicate of #55, but feel free to add any comments on that issue