Update GraphQL.node.ts (#1185)

* Update GraphQL.node.ts

Fix this

* Update GraphQL.node.ts
This commit is contained in:
Henrik Feldt 2020-11-18 23:14:41 +01:00 committed by GitHub
parent 19e2eeadcd
commit d9a7d5fa34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -241,8 +241,8 @@ export class GraphQL implements INodeType {
if (typeof requestOptions.body.variables === 'string') {
try {
requestOptions.body.variables = JSON.parse(requestOptions.body.variables);
} catch {
requestOptions.body.variables = {};
} catch (e) {
throw new Error('Using variables failed:\n' + requestOptions.body.variables + '\n\nWith error message:\n' + e);
}
}
if (requestOptions.body.operationName === '') {