1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.renderGraphiQL = void 0;
|
4 | const graphiql_js_1 = require("./graphiql.js");
|
5 | const renderGraphiQL = (opts) => `
|
6 | <!DOCTYPE html>
|
7 | <html lang="en">
|
8 | <head>
|
9 | <meta charset="utf-8" />
|
10 | <title>${opts?.title || 'Yoga GraphiQL'}</title>
|
11 | <link
|
12 | rel="icon"
|
13 | href="https://raw.githubusercontent.com/dotansimha/graphql-yoga/v3/website/public/favicon.ico"
|
14 | />
|
15 | <style>
|
16 | ${graphiql_js_1.css}
|
17 | </style>
|
18 | </head>
|
19 | <body id="body" class="no-focus-outline">
|
20 | <noscript>You need to enable JavaScript to run this app.</noscript>
|
21 | <div id="root"></div>
|
22 |
|
23 | <script>
|
24 | ${graphiql_js_1.js}
|
25 | YogaGraphiQL.renderYogaGraphiQL(
|
26 | window.document.querySelector('#root'),
|
27 | ${JSON.stringify(opts ?? {})},
|
28 | )
|
29 | </script>
|
30 | </body>
|
31 | </html>
|
32 | `;
|
33 | exports.renderGraphiQL = renderGraphiQL;
|