Skip to content

Instantly share code, notes, and snippets.

@jonchenn
Created February 1, 2019 18:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonchenn/f173f673a8cdaa9eb3fb30f140bbf3e4 to your computer and use it in GitHub Desktop.
Save jonchenn/f173f673a8cdaa9eb3fb30f140bbf3e4 to your computer and use it in GitHub Desktop.
// Workbox with a custom handler to use IndexedDB for caching.
workbox.routing.registerRoute(
'/graphql',
async ({event}) => staleWhileRevalidate(event),
'POST'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment