The New Next.js and SWR Clients: What You Need to Know
Too Long; Didn't Read
Next.js client is using fetch for making requests to the WunderGraph API, which is serving GraphQL operations over a JSON RPC style API. SWR is focused on fetching data, not updating it, and better SSR functionality. With the release of SWR 2.0RC it was time to rewrite our Next.JS client to use SWR. See what's changed and how you can use the new features in the new Next.js client. Queries no longer creates individual hooks for every operation, but instead we simply have 3 hooks, `useQuery` and `useSubscription` that are fully typed.