30 lines
1.1 KiB
HTML
30 lines
1.1 KiB
HTML
<html>
|
|
<head>
|
|
<title>Simple GraphiQL Example</title>
|
|
<link href="https://unpkg.com/graphiql/graphiql.min.css" rel="stylesheet" />
|
|
<!--<link rel="stylesheet" href="/assets/graphiql/graphiql.css">-->
|
|
</head>
|
|
<body style="margin: 0;">
|
|
<div id="graphiql" style="height: 100vh;"></div>
|
|
|
|
<script crossorigin src="https://unpkg.com/react/umd/react.production.min.js"></script>
|
|
<script crossorigin src="https://unpkg.com/react-dom/umd/react-dom.production.min.js"></script>
|
|
<script crossorigin src="https://unpkg.com/graphiql/graphiql.min.js"></script>
|
|
<!--
|
|
<script src="/assets/react/umd/react.development.js"></script>
|
|
<script src="/assets/react-dom/umd/react-dom.development.js"></script>
|
|
<script src="/assets/graphiql/graphiql.js"></script>
|
|
-->
|
|
|
|
<script>
|
|
// This expects a GraphQL server at the path /graphql.
|
|
const fetcher = GraphiQL.createFetcher({ url: '/graphql' });
|
|
|
|
ReactDOM.render(
|
|
React.createElement(GraphiQL, { fetcher: fetcher }),
|
|
document.getElementById('graphiql'),
|
|
);
|
|
</script>
|
|
</body>
|
|
</html>
|