Skip to content

Commit 7267d03

Browse files
authored
fix: GraphiQL Explorer Plugin init function usage (#106)
1 parent e860fd7 commit 7267d03

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Fixed
1515

16+
- GraphiQL Explorer Plugin initialization due to upstream implementation pattern change
17+
1618
### Removed
1719

1820
## Version 0.6.1 - 2023-07-05

app/graphiql.html

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,11 @@
3131
const fetcher = GraphiQL.createFetcher({ url: '' })
3232

3333
function GraphiQLWithExplorer() {
34-
const [query, setQuery] = React.useState()
35-
const explorerPlugin = GraphiQLPluginExplorer.useExplorerPlugin({ query, onEdit: setQuery })
34+
const explorerPlugin = GraphiQLPluginExplorer.explorerPlugin()
3635
return React.createElement(GraphiQL, {
3736
fetcher,
3837
defaultEditorToolsVisibility: true,
39-
plugins: [explorerPlugin],
40-
query,
41-
onEditQuery: setQuery
38+
plugins: [explorerPlugin]
4239
})
4340
}
4441

0 commit comments

Comments
 (0)