@@ -66,7 +66,7 @@ func renderGraphiQL(w http.ResponseWriter, params graphql.Params) {
6666}
6767
6868// graphiqlVersion is the current version of GraphiQL
69- const graphiqlVersion = "0.11.11 "
69+ const graphiqlVersion = "3.8.3 "
7070
7171// tmpl is the page template to render GraphiQL
7272const graphiqlTemplate = `
@@ -100,8 +100,8 @@ add "&raw" to the end of the URL within a browser.
100100 <link href="//cdn.jsdelivr.net/npm/graphiql@{{ .GraphiqlVersion }}/graphiql.css" rel="stylesheet" />
101101 <script src="//cdn.jsdelivr.net/es6-promise/4.0.5/es6-promise.auto.min.js"></script>
102102 <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>
105105 <script src="//cdn.jsdelivr.net/npm/graphiql@{{ .GraphiqlVersion }}/graphiql.min.js"></script>
106106</head>
107107<body>
@@ -143,12 +143,13 @@ add "&raw" to the end of the URL within a browser.
143143 var fetchURL = locationQuery(otherParams);
144144
145145 // Defines a GraphQL fetcher using the fetch API.
146- function graphQLFetcher(graphQLParams) {
146+ function graphQLFetcher(graphQLParams, opts = {headers: {}} ) {
147147 return fetch(fetchURL, {
148148 method: 'post',
149149 headers: {
150150 'Accept': 'application/json',
151- 'Content-Type': 'application/json'
151+ 'Content-Type': 'application/json',
152+ ...opts.headers
152153 },
153154 body: JSON.stringify(graphQLParams),
154155 credentials: 'include',
0 commit comments