Last active
January 20, 2019 01:43
-
-
Save arackaf/bddd3849b1e2a16e556bf5b4b7056c83 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import allSubjects from "../graphQL/subjects/allSubjects.graphql"; | |
| workbox.routing.registerRoute( | |
| /graphql/, | |
| ({ url, event }) => { | |
| return fetch(event.request).catch(err => { | |
| let { query, variables } = parseQueryString(url.search); | |
| if (query == allSubjects) { | |
| return readTable("subjects", "name").then(gqlResponse("allSubjects", "Subjects")); | |
| } | |
| }); | |
| }, | |
| "GET" | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment