-
Notifications
You must be signed in to change notification settings - Fork 276
update swapi to use GraphiQL 5 with Monaco editor and React 19 #247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
} | ||
</script> | ||
</head> | ||
<script type="module"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This <script>
tag is neither in <body>
nor <head>
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great catch, didn't move lines enough from <body>
}); | ||
} | ||
|
||
const container = document.getElementById('graphiql'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess this works despite the call being before the element exists because it's <script type="module">
and there's some imports that cause it to run a tick later?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah it's because <script type="module">
is always defer
red.
per official example https://github.com/graphql/graphiql/blob/main/examples/graphiql-cdn/index.html
(tested locally)
also include tiny fix of confusing console error
module "@emotion/is-prop-valid" not found
, ref graphql/graphiql#4072