From e529dd9a5cc95acfef856e148d38dab80490222d Mon Sep 17 00:00:00 2001 From: adrtivv <144922862+adrtivv@users.noreply.github.com> Date: Mon, 14 Oct 2024 22:26:58 +0530 Subject: [PATCH] updated graphiql and react to the latest stable versions (#1117) --- static/main.js | 8 ++++---- static/sw.js | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/static/main.js b/static/main.js index cdf443b4..090f5147 100644 --- a/static/main.js +++ b/static/main.js @@ -157,7 +157,7 @@ function render () { function importDependencies () { const link = document.createElement('link') - link.href = 'https://unpkg.com/graphiql@2.0.9/graphiql.min.css' + link.href = 'https://unpkg.com/graphiql@3.7.1/graphiql.min.css' link.type = 'text/css' link.rel = 'stylesheet' link.media = 'screen,print' @@ -165,9 +165,9 @@ function importDependencies () { document.getElementsByTagName('head')[0].appendChild(link) return importer.urls([ - '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.9/graphiql.min.js' + 'https://unpkg.com/react@18.3.1/umd/react.production.min.js', + 'https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js', + 'https://unpkg.com/graphiql@3.7.1/graphiql.min.js' ]).then(function () { const pluginUrls = window.GRAPHIQL_PLUGIN_LIST .map(plugin => window[`GRAPIHQL_PLUGIN_${plugin.toUpperCase()}`].umdUrl) diff --git a/static/sw.js b/static/sw.js index ef32ba49..f53dc7a6 100644 --- a/static/sw.js +++ b/static/sw.js @@ -2,13 +2,13 @@ self.addEventListener('install', function (e) { e.waitUntil( - caches.open('graphiql-v2.0.9').then(function (cache) { + caches.open('graphiql-v3.7.1').then(function (cache) { return cache.addAll([ './main.js', - 'https://unpkg.com/graphiql@2.0.9/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.9/graphiql.min.js' + 'https://unpkg.com/graphiql@3.7.1/graphiql.css', + 'https://unpkg.com/react@18.3.1/umd/react.production.min.js', + 'https://unpkg.com/react-dom@18.3.1/umd/react-dom.production.min.js', + 'https://unpkg.com/graphiql@3.7.1/graphiql.min.js' ]) }) )