Skip to content

Instantly share code, notes, and snippets.

Last active Dec 3, 2021
What would you like to do?
<title>Simple GraphiQL Example</title>
<link href="" rel="stylesheet" />
<body style="margin: 0;">
<div id="graphiql" style="height: 100vh;"></div>
<script type="module">
await import('')
await import('')
await import('')
const graphQLFetcher = graphQLParams =>
fetch('http://localhost:4567/graphql', {
method: 'post',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(graphQLParams),
.then(response => response.json())
.catch(() => response.text());
React.createElement(GraphiQL, { fetcher: graphQLFetcher }),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment