Closed ghost closed 3 years ago
In that case (actually, in almost all cases) you would just have one single api. Only use multiple APIs if they have nothing in common (like one api for the facebook api and one for the twitter api) - if they share data, don't split them.
Note that you can still split up that one api over multiple files by using api.injectEndpoints
, see the documentation on code splitting.
Thanks, will use injectEndpoints
then.
Hi,
In
basket.ts
I have the following api :I'm trying to invalidate orders from
orders.ts
but I have the following error :Type '"Orders"' is not assignable to type 'EntityDescription<"Basket">'
. It would be nice to be able to invalide from others api or maybe it's possible and I'm missing something.Content of
orders.ts
file :and basequery is :
Package.json :
Thanks for this great alternative to urql/apollo.