Skip to content

Commit

Permalink
Auto prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
rybon authored May 17, 2019
1 parent f0e0de1 commit 7ffe1eb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/components/GraphiQL.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export class GraphiQL extends React.Component {
editorTheme: PropTypes.string,
onToggleHistory: PropTypes.func,
ResultsTooltip: PropTypes.any,
autoPrettify: PropTypes.boolean,
};

constructor(props) {
Expand Down Expand Up @@ -150,6 +151,10 @@ export class GraphiQL extends React.Component {
this.codeMirrorSizer = new CodeMirrorSizer();

global.g = this;

if (this.props.autoPrettify) {
this.handlePrettifyQuery();
}
}

componentWillReceiveProps(nextProps) {
Expand Down

0 comments on commit 7ffe1eb

Please sign in to comment.