Skip to content

Commit

Permalink
fix: fix query argument missing from onEditQuery call (#1440)
Browse files Browse the repository at this point in the history
  • Loading branch information
cshaver authored Mar 25, 2020
1 parent 5e098a4 commit 6c335a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/graphiql/src/components/GraphiQL.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type GraphiQLProps = {
defaultQuery?: string;
defaultVariableEditorOpen?: boolean;
onCopyQuery?: (query?: string) => void;
onEditQuery?: () => void;
onEditQuery?: (query?: string) => void;
onEditVariables?: (value: string) => void;
onEditOperationName?: (operationName: string) => void;
onToggleDocs?: (docExplorerOpen: boolean) => void;
Expand Down Expand Up @@ -978,7 +978,7 @@ export class GraphiQL extends React.Component<GraphiQLProps, GraphiQLState> {
...queryFacts,
});
if (this.props.onEditQuery) {
return this.props.onEditQuery();
return this.props.onEditQuery(value);
}
});

Expand Down

0 comments on commit 6c335a8

Please sign in to comment.