diff --git a/CHANGELOG.md b/CHANGELOG.md index fd6acc2..067219b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ -## 1.1.0 +## next + +- Changed `graphiqlApp` to expose `App` instance (result of top level render) + +## 1.1.0 (10-03-2021) - Reworked build scripts - Removed CommonJS bundle diff --git a/src/index.jsx b/src/index.jsx index 447070e..7560f12 100644 --- a/src/index.jsx +++ b/src/index.jsx @@ -90,10 +90,9 @@ class App extends Component { ...(editor.options.extraKeys || {}), "Shift-Alt-LeftClick": this._handleInspectOperation }); - editor.refresh(); - this._graphiql.getVariableEditor().refresh(); this.setState({ schema: buildClientSchema(result.data) }); + this._graphiql.refresh(); }); } @@ -250,7 +249,7 @@ class App extends Component { } export function graphiqlApp(endpoint, discovery, elem) { - render( + return render( , elem || document.getElementById('root') );