Refactor Apollo Client handling

This commit is contained in:
Andrew Bastin
2021-05-03 09:18:24 -04:00
parent b8bc110d33
commit 627811f28d
5 changed files with 104 additions and 31 deletions

View File

@@ -39,16 +39,6 @@ export default {
"background-color:black;padding:4px 8px;border-radius:8px;font-size:16px;color:white;"
)
// Update GraphQL Token on firebase ID Token changes
fb.idToken$.subscribe((token) => {
if (token) {
console.log(token)
this.$apolloHelpers.onLogin(token)
} else {
this.$apolloHelpers.onLogout()
}
})
const workbox = await window.$workbox
if (workbox) {
workbox.addEventListener("installed", (event) => {