From e5d223794fef4ccad5d6566e1eafac4a64447013 Mon Sep 17 00:00:00 2001 From: Julian Koehn Date: Wed, 25 Jun 2025 08:33:47 +0200 Subject: [PATCH 1/2] fix(graphiql): update graphiql playground to latest version --- v2/pkg/playground/files/playground.html | 167 +++++++++++++----------- 1 file changed, 89 insertions(+), 78 deletions(-) diff --git a/v2/pkg/playground/files/playground.html b/v2/pkg/playground/files/playground.html index b6c78d504c..a20eddc410 100644 --- a/v2/pkg/playground/files/playground.html +++ b/v2/pkg/playground/files/playground.html @@ -1,5 +1,5 @@ - - GraphiQL + + + + GraphiQL 5 with React 19 and GraphiQL Explorer - - - - - - - - - + #graphiql { + height: 100dvh; + } + .loading { + height: 100%; + display: flex; + align-items: center; + justify-content: center; + font-size: 4rem; + } + + - + + + - - + const container = document.getElementById('graphiql'); + const root = ReactDOM.createRoot(container); + root.render(React.createElement(App)); + + + +
+
Loading…
+
+ + \ No newline at end of file From f0af1d08eee3e38f69558698939fcd48bb9cb901 Mon Sep 17 00:00:00 2001 From: Julian Koehn Date: Wed, 25 Jun 2025 08:51:04 +0200 Subject: [PATCH 2/2] fix(playground): missed endpoint url --- v2/pkg/playground/files/playground.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/v2/pkg/playground/files/playground.html b/v2/pkg/playground/files/playground.html index a20eddc410..4514667713 100644 --- a/v2/pkg/playground/files/playground.html +++ b/v2/pkg/playground/files/playground.html @@ -65,6 +65,8 @@ import createGraphQLWorker from 'https://esm.sh/monaco-graphql/esm/graphql.worker.js?worker'; import createEditorWorker from 'https://esm.sh/monaco-editor/esm/vs/editor/editor.worker.js?worker'; + const endpointURL = "{{ .EndpointURL }}"; + globalThis.MonacoEnvironment = { getWorker(_workerId, label) { console.info('MonacoEnvironment.getWorker', { label }); @@ -79,7 +81,7 @@ }; const fetcher = createGraphiQLFetcher({ - url: 'https://countries.trevorblades.com', + url: endpointURL, }); const plugins = [HISTORY_PLUGIN, explorerPlugin()];