-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
42 lines (40 loc) · 1.12 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<meta name="theme-color" content="#000000" />
<style>
#BROWSER_CONFIG {
display: none;
}
</style>
<title>GraphQL Browser</title>
<link rel="icon" href="/logo.svg" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
</head>
<body>
<noscript> You need to enable JavaScript to run this app. </noscript>
<div id="root"></div>
<div id="BROWSER_CONFIG">
{ "uri": "https://poke-api-delta.vercel.app/api/graphql" }
</div>
<script type="module">
import React from "react";
import { render } from "react-dom";
import { Browser } from "./src/index.tsx";
const config = document.getElementById("BROWSER_CONFIG");
render(
React.createElement(Browser, {
initialSchemaConfig: config
? JSON.parse(config.innerText)
: undefined,
}),
document.getElementById("root")
);
</script>
</body>
</html>