mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-13 05:47:31 -08:00
Fix [object Object] issue in interface
This commit is contained in:
parent
8b04f1ff37
commit
971a134cc4
|
@ -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,7 +194,11 @@ 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") {
|
||||||
requestOptions.body.variables = {};
|
try {
|
||||||
|
requestOptions.body.variables = JSON.parse(requestOptions.body.variables)
|
||||||
|
} catch {
|
||||||
|
requestOptions.body.variables = {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (requestOptions.body.operationName === "") {
|
if (requestOptions.body.operationName === "") {
|
||||||
requestOptions.body.operation = null;
|
requestOptions.body.operation = null;
|
||||||
|
|
Loading…
Reference in a new issue