@@ -66,7 +66,7 @@ func renderGraphiQL(w http.ResponseWriter, params graphql.Params) {
66
66
}
67
67
68
68
// graphiqlVersion is the current version of GraphiQL
69
- const graphiqlVersion = "0.11.11 "
69
+ const graphiqlVersion = "3.8.3 "
70
70
71
71
// tmpl is the page template to render GraphiQL
72
72
const graphiqlTemplate = `
@@ -100,8 +100,8 @@ add "&raw" to the end of the URL within a browser.
100
100
<link href="//cdn.jsdelivr.net/npm/graphiql@{{ .GraphiqlVersion }}/graphiql.css" rel="stylesheet" />
101
101
<script src="//cdn.jsdelivr.net/es6-promise/4.0.5/es6-promise.auto.min.js"></script>
102
102
<script src="//cdn.jsdelivr.net/fetch/0.9.0/fetch.min.js"></script>
103
- <script src="//cdn.jsdelivr.net/react/15.4.2/ react.min.js"></script>
104
- <script src="//cdn.jsdelivr.net/react/15.4.2/ react-dom.min.js"></script>
103
+ <script src="//cdn.jsdelivr.net/npm/react@18.3.1/umd/ react.production .min.js"></script>
104
+ <script src="//cdn.jsdelivr.net/npm/react-dom@18.3.1/umd/ react-dom.production .min.js"></script>
105
105
<script src="//cdn.jsdelivr.net/npm/graphiql@{{ .GraphiqlVersion }}/graphiql.min.js"></script>
106
106
</head>
107
107
<body>
@@ -143,12 +143,13 @@ add "&raw" to the end of the URL within a browser.
143
143
var fetchURL = locationQuery(otherParams);
144
144
145
145
// Defines a GraphQL fetcher using the fetch API.
146
- function graphQLFetcher(graphQLParams) {
146
+ function graphQLFetcher(graphQLParams, opts = {headers: {}} ) {
147
147
return fetch(fetchURL, {
148
148
method: 'post',
149
149
headers: {
150
150
'Accept': 'application/json',
151
- 'Content-Type': 'application/json'
151
+ 'Content-Type': 'application/json',
152
+ ...opts.headers
152
153
},
153
154
body: JSON.stringify(graphQLParams),
154
155
credentials: 'include',
0 commit comments