message: Allow customize of result formatting (Prettier for example)
diff: @@ -563,9 +563,7 @@ export class GraphiQL extends React.Component {
  this.setState({ schema, ...queryFacts });
  } else {
  const responseString =
  - typeof result === 'string'
  - ? result
  - : JSON.stringify(result, null, 2);
  + typeof result === 'string' ? result : GraphiQL.formatResult(result);
  this.setState({
  // Set schema to `null` to explicitly indicate that no schema exists.
  schema: null,
  @@ -678,7 +676,7 @@ export class GraphiQL extends React.Component {
  if (queryID === this._editorQueryID) {
  this.setState({
  isWaitingForResponse: false,
  - response: JSON.stringify(result, null, 2),
  + response: GraphiQL.formatResult(result),
  });
  }
  },
  @@ -1066,6 +1064,10 @@ GraphiQL.Footer = function GraphiQLFooter(props) {
  return <div className="footer">{props.children}</div>;
  };
  +GraphiQL.formatResult = function(result) {
  + return JSON.stringify(result, null, 2);
  +};
  +
  const defaultQuery = `# Welcome to GraphiQL
  #
  # GraphiQL is an in-browser tool for writing, validating, and
  