fix: Issue with incorrect OperationName applied on GraphQL request #6074
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
changelog(Fixes): Fixed an issue where the Operation Name wasn't being correctly transferred to the GraphQL Body when modifying the GraphQL Query
I've made changes to correct an issue where the Operation Name wasn't being correctly transferred to the GraphQL Body when modifying the GraphQL Query.
There might be a connection with issue #5752
There were two primary issues:
an issue was observed where the previous Operation Name was passed to the GraphQL Body, even when the Operation Name in the GraphQL Query was empty. To address this, we've adjusted the logic so that if the Operation Name is absent, the state.body.operationName deleted, preventing it from being transferred.
there was a delay in the application of changes to the Operation Name in the GraphQL Query. To rectify this, the getGraphQLContent function has been updated to include the current Operation Name as an argument when called, ensuring its immediate application.