Skip to content

Commit f29f202

Browse files
fix(gate): update graphql playground deps (#1012)
<!-- Pull requests are squashed and merged using: - their title as the commit message - their description as the commit body Having a good title and description is important for the users to get readable changelog. --> <!-- 1. Explain WHAT the change is about --> - Fixes broken graphQL playground by updating the react version and pinning graphiql. <!-- 3. Explain HOW users should update their code --> #### Migration notes --- - [ ] The change comes with new or modified tests - [ ] Hard-to-understand functions have explanatory comments - [ ] End-user documentation is updated to reflect the change <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Upgraded the GraphiQL playground to use the latest React and GraphiQL versions for improved performance and compatibility. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent e208863 commit f29f202

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/typegate/src/services/playground_service.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ export const handlePlaygroundGraphQL = (
2020
<head>
2121
<meta charset="UTF-8" />
2222
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
23-
<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
24-
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
25-
<link rel="stylesheet" href="https://unpkg.com/graphiql/graphiql.min.css" />
23+
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
24+
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
25+
<link rel="stylesheet" href="https://unpkg.com/graphiql@4/graphiql.min.css" />
2626
<style>
2727
body {
2828
margin: 0;
@@ -76,7 +76,7 @@ export const handlePlaygroundGraphQL = (
7676
<body>
7777
<div id="graphiql">Loading...</div>
7878
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
79-
<script src="https://unpkg.com/graphiql/graphiql.min.js" type="application/javascript"></script>
79+
<script src="https://unpkg.com/graphiql@4/graphiql.min.js" type="application/javascript"></script>
8080
<script data-plugins="transform-es2015-modules-umd" type="text/babel">
8181
const fetcher = GraphiQL.createFetcher({
8282
url: "${url}"
@@ -100,7 +100,7 @@ export const handlePlaygroundGraphQL = (
100100
</GraphiQL.Logo>
101101
</GraphiQL>
102102
);
103-
ReactDOM.render(app, document.getElementById('graphiql'));
103+
ReactDOM.createRoot(document.getElementById('graphiql')).render(app);
104104
</script>
105105
</body>
106106
</html>

0 commit comments

Comments
 (0)