@graphql-yoga/render-graphiql 5.15.2-alpha-20250906153328-e7438b13503c94b5e912ead1070d1a1f570a4979 → 5.15.2-alpha-20250906194016-8ff5d81a715f461f2e7e2b2ece23fdd1ff3d26b9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { css, favicon, js } from './graphiql.js';
1
+ import { css, editorWorkerService, favicon, graphqlWorker, js, jsonWorker } from './graphiql.js';
2
2
  export const renderGraphiQL = (opts) => /* HTML */ `
3
3
  <!doctype html>
4
4
  <html lang="en">
@@ -15,6 +15,21 @@ export const renderGraphiQL = (opts) => /* HTML */ `
15
15
  <div id="root"></div>
16
16
 
17
17
  <script>
18
+ function prepareBlob(workerContent) {
19
+ const blob = new Blob([workerContent], { type: 'application/javascript' });
20
+ return URL.createObjectURL(blob);
21
+ }
22
+ const workers = {
23
+ editorWorkerService: prepareBlob(${JSON.stringify(editorWorkerService)}),
24
+ json: prepareBlob(${JSON.stringify(jsonWorker)}),
25
+ graphql: prepareBlob(${JSON.stringify(graphqlWorker)}),
26
+ };
27
+ self['MonacoEnvironment'] = {
28
+ globalAPI: false,
29
+ getWorkerUrl: function (moduleId, label) {
30
+ return workers[label];
31
+ },
32
+ };
18
33
  ${js};
19
34
  YogaGraphiQL.renderYogaGraphiQL(
20
35
  window.document.querySelector('#root'),
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@graphql-yoga/render-graphiql",
3
- "version": "5.15.2-alpha-20250906153328-e7438b13503c94b5e912ead1070d1a1f570a4979",
3
+ "version": "5.15.2-alpha-20250906194016-8ff5d81a715f461f2e7e2b2ece23fdd1ff3d26b9",
4
4
  "description": "",
5
5
  "peerDependencies": {
6
- "graphql-yoga": "^5.15.2-alpha-20250906153328-e7438b13503c94b5e912ead1070d1a1f570a4979"
6
+ "graphql-yoga": "^5.15.2-alpha-20250906194016-8ff5d81a715f461f2e7e2b2ece23fdd1ff3d26b9"
7
7
  },
8
8
  "repository": {
9
9
  "type": "git",
@@ -1,3 +1,6 @@
1
1
  export declare const js: string;
2
2
  export declare const css: string;
3
3
  export declare const favicon: string;
4
+ export declare const editorWorkerService: string;
5
+ export declare const jsonWorker: string;
6
+ export declare const graphqlWorker: string;
@@ -1,3 +1,6 @@
1
1
  export declare const js: string;
2
2
  export declare const css: string;
3
3
  export declare const favicon: string;
4
+ export declare const editorWorkerService: string;
5
+ export declare const jsonWorker: string;
6
+ export declare const graphqlWorker: string;