Skip to content

Commit

Permalink
Merge pull request #12 from d4vsanchez/remove-debounce
Browse files Browse the repository at this point in the history
Remove 100ms debounce when editing query
  • Loading branch information
exdis authored Jun 7, 2021
2 parents cfc5f86 + 32d861c commit 53b613e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/graphiql.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1251,7 +1251,7 @@ export class GraphiQL extends React.Component<GraphiQLProps, GraphiQLState> {
editor.setValue(print(mergeAST(ast, this.state.schema)));
};

handleEditQuery = debounce(100, (value: string) => {
handleEditQuery = (value: string) => {
const queryFacts = this._updateQueryFacts(
value,
this.state.operationName,
Expand All @@ -1266,7 +1266,7 @@ export class GraphiQL extends React.Component<GraphiQLProps, GraphiQLState> {
if (this.props.onEditQuery) {
return this.props.onEditQuery(value, queryFacts?.documentAST);
}
});
};

handleCopyQuery = () => {
const editor = this.getQueryEditor();
Expand Down

0 comments on commit 53b613e

Please sign in to comment.