ecyrbe/zodios

Is there a way to setup invalidation on API/endpoint creation?

fmartins-andre opened this issue · 2 comments

In RTK Query is easy to set what to invalidate at the endpoint declaration scope. Is there a way to do the same with Zodios?

ecyrbe commented

Hello,
No, invalidation is not declarative, it should be handled like react-query does it.
Indeed zodios is endpoint oriented (opposed to resource oriented like RTK or GraphQL) to allow any api out there that don't conforme to rest strictly.
But i'm making it possible to declare ressources in this library here :
https://github.com/ts-api-spec/typematic

I'm planning to make next version of zodios use it. And this will unlock such feature in the future.

ecyrbe commented

Converting to a discussion.