fix: Issue with incorrect OperationName applied on GraphQL request (#6074)

* fix: Retained operation name in GraphQL requests

* fix: Ensure Immediate Reflection of operationName Changes in GraphQL Query
This commit is contained in:
SeungWon 2023-07-12 00:01:57 +09:00 committed by GitHub
parent fe63357a93
commit 7b416220af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -291,7 +291,11 @@ export const GraphQLEditor: FC<Props> = ({
}
}
const content = getGraphQLContent(state.body, query);
if (!operationName) {
delete state.body.operationName;
}
const content = getGraphQLContent(state.body, query, operationName);
onChange(content);
setState(state => ({