@@ -158,11 +158,11 @@ mod tests {
158
158
</style>
159
159
<script
160
160
crossorigin
161
- src="https://unpkg.com/react@17 /umd/react.development.js"
161
+ src="https://unpkg.com/react@18 /umd/react.development.js"
162
162
></script>
163
163
<script
164
164
crossorigin
165
- src="https://unpkg.com/react-dom@17 /umd/react-dom.development.js"
165
+ src="https://unpkg.com/react-dom@18 /umd/react-dom.development.js"
166
166
></script>
167
167
<link rel="icon" href="https://graphql.org/favicon.ico">
168
168
<link rel="stylesheet" href="https://unpkg.com/graphiql/graphiql.min.css" />
@@ -187,15 +187,14 @@ mod tests {
187
187
return url.toString();
188
188
}
189
189
190
- ReactDOM.render(
190
+ ReactDOM.createRoot(document.getElementById("graphiql")). render(
191
191
React.createElement(GraphiQL, {
192
192
fetcher: GraphiQL.createFetcher({
193
193
url: createUrl('/'),
194
194
fetch: customFetch,
195
195
}),
196
196
defaultEditorToolsVisibility: true,
197
- }),
198
- document.getElementById("graphiql")
197
+ })
199
198
);
200
199
</script>
201
200
</body>
@@ -236,11 +235,11 @@ mod tests {
236
235
</style>
237
236
<script
238
237
crossorigin
239
- src="https://unpkg.com/react@17 /umd/react.development.js"
238
+ src="https://unpkg.com/react@18 /umd/react.development.js"
240
239
></script>
241
240
<script
242
241
crossorigin
243
- src="https://unpkg.com/react-dom@17 /umd/react-dom.development.js"
242
+ src="https://unpkg.com/react-dom@18 /umd/react-dom.development.js"
244
243
></script>
245
244
<link rel="icon" href="https://graphql.org/favicon.ico">
246
245
<link rel="stylesheet" href="https://unpkg.com/graphiql/graphiql.min.css" />
@@ -265,16 +264,15 @@ mod tests {
265
264
return url.toString();
266
265
}
267
266
268
- ReactDOM.render(
267
+ ReactDOM.createRoot(document.getElementById("graphiql")). render(
269
268
React.createElement(GraphiQL, {
270
269
fetcher: GraphiQL.createFetcher({
271
270
url: createUrl('/'),
272
271
fetch: customFetch,
273
272
subscriptionUrl: createUrl('/ws', true),
274
273
}),
275
274
defaultEditorToolsVisibility: true,
276
- }),
277
- document.getElementById("graphiql")
275
+ })
278
276
);
279
277
</script>
280
278
</body>
@@ -321,11 +319,11 @@ mod tests {
321
319
</style>
322
320
<script
323
321
crossorigin
324
- src="https://unpkg.com/react@17 /umd/react.development.js"
322
+ src="https://unpkg.com/react@18 /umd/react.development.js"
325
323
></script>
326
324
<script
327
325
crossorigin
328
- src="https://unpkg.com/react-dom@17 /umd/react-dom.development.js"
326
+ src="https://unpkg.com/react-dom@18 /umd/react-dom.development.js"
329
327
></script>
330
328
<link rel="icon" href="https://graphql.org/favicon.ico">
331
329
<link rel="stylesheet" href="https://unpkg.com/graphiql/graphiql.min.css" />
@@ -358,7 +356,7 @@ mod tests {
358
356
const plugins = [];
359
357
plugins.push(GraphiQLPluginExplorer.explorerPlugin());
360
358
361
- ReactDOM.render(
359
+ ReactDOM.createRoot(document.getElementById("graphiql")). render(
362
360
React.createElement(GraphiQL, {
363
361
fetcher: GraphiQL.createFetcher({
364
362
url: createUrl('/'),
@@ -373,8 +371,7 @@ mod tests {
373
371
}),
374
372
defaultEditorToolsVisibility: true,
375
373
plugins,
376
- }),
377
- document.getElementById("graphiql")
374
+ })
378
375
);
379
376
</script>
380
377
</body>