mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
⚡ Fix GraphQL Bug
This commit is contained in:
parent
f558616376
commit
8214a7f22a
|
@ -240,7 +240,7 @@ export class GraphQL implements INodeType {
|
||||||
};
|
};
|
||||||
if (typeof requestOptions.body.variables === 'string') {
|
if (typeof requestOptions.body.variables === 'string') {
|
||||||
try {
|
try {
|
||||||
requestOptions.body.variables = JSON.parse(requestOptions.body.variables);
|
requestOptions.body.variables = JSON.parse(requestOptions.body.variables || '{}');
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
throw new Error('Using variables failed:\n' + requestOptions.body.variables + '\n\nWith error message:\n' + e);
|
throw new Error('Using variables failed:\n' + requestOptions.body.variables + '\n\nWith error message:\n' + e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue