Would it be possible to use SWR, by leveraging on useSWR hook instead of useQuery? I imagine it can be done by creating a custom fetcher using a JSONAPI ApiClient.fetch
useSWR
useQuery
ApiClient.fetch