mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
Fix [object Object] issue in interface
This commit is contained in:
@@ -92,7 +92,7 @@ export class GraphQL implements INodeType {
|
|||||||
displayName: 'Variables',
|
displayName: 'Variables',
|
||||||
name: 'variables',
|
name: 'variables',
|
||||||
type: 'json',
|
type: 'json',
|
||||||
default: {},
|
default: '',
|
||||||
description: 'Query variables',
|
description: 'Query variables',
|
||||||
displayOptions: {
|
displayOptions: {
|
||||||
show: {
|
show: {
|
||||||
@@ -194,8 +194,12 @@ export class GraphQL implements INodeType {
|
|||||||
operationName: this.getNodeParameter('operationName', itemIndex, null) as string,
|
operationName: this.getNodeParameter('operationName', itemIndex, null) as string,
|
||||||
};
|
};
|
||||||
if (typeof requestOptions.body.variables === "string") {
|
if (typeof requestOptions.body.variables === "string") {
|
||||||
|
try {
|
||||||
|
requestOptions.body.variables = JSON.parse(requestOptions.body.variables)
|
||||||
|
} catch {
|
||||||
requestOptions.body.variables = {};
|
requestOptions.body.variables = {};
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (requestOptions.body.operationName === "") {
|
if (requestOptions.body.operationName === "") {
|
||||||
requestOptions.body.operation = null;
|
requestOptions.body.operation = null;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user