mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(GraphQL Node): Fix request format JSON error (#8646)
This commit is contained in:
@@ -424,9 +424,8 @@ export class GraphQL implements INodeType {
|
||||
requestOptions.qs.query = gqlQuery;
|
||||
} else {
|
||||
if (requestFormat === 'json') {
|
||||
const jsonBody = requestOptions.body as IDataObject;
|
||||
requestOptions.body = {
|
||||
...jsonBody,
|
||||
const jsonBody = {
|
||||
...requestOptions.body,
|
||||
query: gqlQuery,
|
||||
variables: this.getNodeParameter('variables', itemIndex, {}) as object,
|
||||
operationName: this.getNodeParameter('operationName', itemIndex) as string,
|
||||
@@ -449,6 +448,7 @@ export class GraphQL implements INodeType {
|
||||
jsonBody.operationName = null;
|
||||
}
|
||||
requestOptions.json = true;
|
||||
requestOptions.body = jsonBody;
|
||||
} else {
|
||||
requestOptions.body = gqlQuery;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user