Repository navigation
Expand file tree
/
Copy pathindex.blade.php
More file actions
73 lines (64 loc) · 2.01 KB
/
Copy pathindex.blade.php
File metadata and controls
73 lines (64 loc) · 2.01 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{{-- See https://github.com/graphql/graphiql/blob/main/examples/graphiql-cdn/index.html. --}}
@php
use MLL\GraphiQL\GraphiQLAsset;
@endphp
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GraphiQL</title>
<style>
body {
margin: 0;
overflow: hidden; /* in Firefox */
}
#graphiql {
height: 100dvh;
}
#graphiql-loading {
height: 100%;
display: flex;
align-items: center;
justify-content: center;
font-size: 4rem;
}
.docExplorerWrap {
/* Allow scrolling, see https://github.com/graphql/graphiql/issues/3098. */
overflow: auto !important;
}
</style>
<script src="{{ GraphiQLAsset::reactJS() }}"></script>
<script src="{{ GraphiQLAsset::reactDOMJS() }}"></script>
<link rel="stylesheet" href="{{ GraphiQLAsset::graphiQLCSS() }}"/>
<link rel="stylesheet" href="{{ GraphiQLAsset::pluginExplorerCSS() }}"/>
<link rel="shortcut icon" href="{{ GraphiQLAsset::favicon() }}"/>
</head>
<body>
<div id="graphiql">
<div id="graphiql-loading">Loading…</div>
</div>
<script src="{{ GraphiQLAsset::graphiQLJS() }}"></script>
<script src="{{ GraphiQLAsset::pluginExplorerJS() }}"></script>
<script>
const fetcher = GraphiQL.createFetcher({
url: '{{ $url }}',
subscriptionUrl: '{{ $subscriptionUrl }}',
});
const explorer = GraphiQLPluginExplorer.explorerPlugin();
function GraphiQLWithExplorer() {
return React.createElement(GraphiQL, {
fetcher,
plugins: [
explorer,
],
// See https://github.com/graphql/graphiql/tree/main/packages/graphiql#props for available settings
});
}
ReactDOM.render(
React.createElement(GraphiQLWithExplorer),
document.getElementById('graphiql'),
);
</script>
</body>
</html>