mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -08:00
⚡ Update GraphQL.node.ts (#1185)
* Update GraphQL.node.ts Fix this * Update GraphQL.node.ts
This commit is contained in:
parent
19e2eeadcd
commit
d9a7d5fa34
|
@ -241,8 +241,8 @@ 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 {
|
} catch (e) {
|
||||||
requestOptions.body.variables = {};
|
throw new Error('Using variables failed:\n' + requestOptions.body.variables + '\n\nWith error message:\n' + e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (requestOptions.body.operationName === '') {
|
if (requestOptions.body.operationName === '') {
|
||||||
|
|
Loading…
Reference in a new issue