UNPKG

@graphql-yoga/render-graphiql

Version:
31 lines (29 loc) 882 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.renderGraphiQL = void 0; const graphiql_js_1 = require("./graphiql.js"); const renderGraphiQL = (opts) => /* HTML */ ` <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> <title>${opts?.title || 'Yoga GraphiQL'}</title> <link rel="icon" href="${graphiql_js_1.favicon}" /> <style> ${graphiql_js_1.css} </style> </head> <body id="body" class="no-focus-outline"> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="root"></div> <script> ${graphiql_js_1.js} YogaGraphiQL.renderYogaGraphiQL( window.document.querySelector('#root'), ${JSON.stringify(opts ?? {})}, ) </script> </body> </html> `; exports.renderGraphiQL = renderGraphiQL;