GraphQL Data Fetching with SWR React Hooks and Hasura
From SWR's github repo: The name “SWR” is derived from stale-while-revalidate, a cache invalidation strategy popularized by HTTP RFC 5861. SWR first returns the data from cache (stale), then sends the fetch request (revalidate), and finally comes with the up-to-date data again. GraphQL requests are just HTTP POST requests with a JSON payload at the end of the day. It doesn't need the typical…
This is an excerpt. The full article continues at Hasura.