Skip to content

Commit

Permalink
Expose app instance (result of top level render)
Browse files Browse the repository at this point in the history
  • Loading branch information
lahmatiy committed Mar 10, 2021
1 parent 0ab2841 commit 0675a25
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
});
}

Expand Down Expand Up @@ -250,7 +249,7 @@ class App extends Component {
}

export function graphiqlApp(endpoint, discovery, elem) {
render(
return render(
<App endpoint={endpoint} discovery={discovery} />,
elem || document.getElementById('root')
);
Expand Down

0 comments on commit 0675a25

Please sign in to comment.