mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -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') {
|
||||
try {
|
||||
requestOptions.body.variables = JSON.parse(requestOptions.body.variables);
|
||||
requestOptions.body.variables = JSON.parse(requestOptions.body.variables || '{}');
|
||||
} catch (e) {
|
||||
throw new Error('Using variables failed:\n' + requestOptions.body.variables + '\n\nWith error message:\n' + e);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue