Skip to content

Commit

Permalink
feat: update to graphiql@2 (#855)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrei Alecu <andreialecu@users.noreply.github.com>
  • Loading branch information
andreialecu and andreialecu committed Aug 29, 2022
1 parent 93d909b commit d26c370
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
9 changes: 4 additions & 5 deletions static/main.js
Expand Up @@ -42,18 +42,17 @@ function render () {

function importDependencies () {
const link = document.createElement('link')
link.href = 'https://unpkg.com/graphiql@1.4.2/graphiql.css'
link.href = 'https://unpkg.com/graphiql@2.0.2/graphiql.min.css'
link.type = 'text/css'
link.rel = 'stylesheet'
link.media = 'screen,print'
link.crossOrigin = 'anonymous'
document.getElementsByTagName('head')[0].appendChild(link)

return importer.urls([
'https://unpkg.com/react@16.8.0/umd/react.production.min.js',
'https://unpkg.com/react-dom@16.8.0/umd/react-dom.production.min.js',
'https://unpkg.com/graphiql@1.4.2/graphiql.min.js',
'https://unpkg.com/subscriptions-transport-ws@0.9.19/browser/client.js'
'https://unpkg.com/react@18.2.0/umd/react.production.min.js',
'https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js',
'https://unpkg.com/graphiql@2.0.2/graphiql.min.js'
])
}

Expand Down
11 changes: 5 additions & 6 deletions static/sw.js
Expand Up @@ -2,14 +2,13 @@

self.addEventListener('install', function (e) {
e.waitUntil(
caches.open('graphiql-v1.4.0').then(function (cache) {
caches.open('graphiql-v2.0.2').then(function (cache) {
return cache.addAll([
'./main.js',
'https://unpkg.com/graphiql@1.4.2/graphiql.css',
'https://unpkg.com/react@16.8.0/umd/react.production.min.js',
'https://unpkg.com/react-dom@16.8.0/umd/react-dom.production.min.js',
'https://unpkg.com/graphiql@1.4.2/graphiql.min.js',
'https://unpkg.com/subscriptions-transport-ws@0.9.19/browser/client.js'
'https://unpkg.com/graphiql@2.0.2/graphiql.css',
'https://unpkg.com/react@18.2.0/umd/react.production.min.js',
'https://unpkg.com/react-dom@18.2.0/umd/react-dom.production.min.js',
'https://unpkg.com/graphiql@2.0.2/graphiql.min.js'
])
})
)
Expand Down

0 comments on commit d26c370

Please sign in to comment.