This plug-in infra can be re-used to enable more users have fun with declarative data fetching. This PR enables React Query users to use a next-rq-endpoints plugin for their data fetching, just like next-swr-endpoints. The API surface is pretty much the same, but the types are slightly different. Maybe we can minimize it to next-api-endpoints/react-query and next-api-endpoints/swr but for now (as these packages aren't published anyway) we can go with this.
This plug-in infra can be re-used to enable more users have fun with declarative data fetching. This PR enables React Query users to use a
next-rq-endpoints
plugin for their data fetching, just likenext-swr-endpoints
. The API surface is pretty much the same, but the types are slightly different. Maybe we can minimize it tonext-api-endpoints/react-query
andnext-api-endpoints/swr
but for now (as these packages aren't published anyway) we can go with this.