@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/cjs/graphiql.js +6 -3
- package/cjs/index.js +15 -0
- package/esm/graphiql.js +5 -2
- package/esm/index.js +16 -1
- package/package.json +2 -2
- package/typings/graphiql.d.cts +3 -0
- package/typings/graphiql.d.ts +3 -0
package/cjs/index.js
CHANGED
|
@@ -18,6 +18,21 @@ const renderGraphiQL = (opts) => /* HTML */ `
|
|
|
18
18
|
<div id="root"></div>
|
|
19
19
|
|
|
20
20
|
<script>
|
|
21
|
+
function prepareBlob(workerContent) {
|
|
22
|
+
const blob = new Blob([workerContent], { type: 'application/javascript' });
|
|
23
|
+
return URL.createObjectURL(blob);
|
|
24
|
+
}
|
|
25
|
+
const workers = {
|
|
26
|
+
editorWorkerService: prepareBlob(${JSON.stringify(graphiql_js_1.editorWorkerService)}),
|
|
27
|
+
json: prepareBlob(${JSON.stringify(graphiql_js_1.jsonWorker)}),
|
|
28
|
+
graphql: prepareBlob(${JSON.stringify(graphiql_js_1.graphqlWorker)}),
|
|
29
|
+
};
|
|
30
|
+
self['MonacoEnvironment'] = {
|
|
31
|
+
globalAPI: false,
|
|
32
|
+
getWorkerUrl: function (moduleId, label) {
|
|
33
|
+
return workers[label];
|
|
34
|
+
},
|
|
35
|
+
};
|
|
21
36
|
${graphiql_js_1.js};
|
|
22
37
|
YogaGraphiQL.renderYogaGraphiQL(
|
|
23
38
|
window.document.querySelector('#root'),
|