# GraphQL node not passing variables

**URL:** <https://community.n8n.io/t/graphql-node-not-passing-variables/3069>\
**Category:** Questions\
**Created:** [November 18, 2020, 5:06pm UTC](https://community.n8n.io/t/graphql-node-not-passing-variables/3069 "2020-11-18T17:06:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![haf](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/haf/32/2401_2.png) [@haf](https://community.n8n.io/u/haf)\
**Post date:** [November 18, 2020, 5:06pm UTC](https://community.n8n.io/t/graphql-node-not-passing-variables/3069/1 "2020-11-18T17:06:26Z")

</div>

It would seem the GraphQL node is faulty in that it doesn’t pass along variables. Here’s what the designer says my variables are:

 ![image](https://europe1.discourse-cdn.com/n8n/original/2X/f/f0a6626dae23a9448b9e1785f58c8e26b44fb205.png)

Here’s what the GraphQL server gets:

```json
{
"type":"http-log",
"timestamp":"2020-11-18T16:54:31.707+0000",
"level":"error",
"detail":{
  "operation":{
    "user_vars":{"x-hasura-role":"admin"},
    "error":{
      "path":"$.variableValues",
      "error":"expecting a value for non-nullable variable: o of type: fivetran_connectors_insert_input! in variableValues",
      "code":"validation-failed"
    },
    "request_id":"6703726f-00b3-991f-a4d3-4235bdd3fb9f",
    "response_size":172,
    "query":{
      "variables":{},
      "operationName":"UpsertFivetranConnector",
      "query":"mutation UpsertFivetranConnector($o: fivetran_connectors_insert_input!) {\n insert_fivetran_connectors_one(\n object: $o, \n on_conflict: {\n constraint: connectors_pkey,\n update_columns: [setup_state, data]\n }) {\n id\n }\n}\n"}},
    "http_info":{
      "status":200,
      "http_version":"HTTP/1.1",
      "url":"/v1/graphql",
      "ip":"127.0.0.1",
      "method":"POST",
      "content_encoding":null
    }
  }
}

```

Note the distinct lack of variables passed along.

Definition:

```json
    {
      "parameters": {
        "endpoint": "http://analytics-db-m2m/v1/graphql",
        "requestFormat": "json",
        "query": "mutation UpsertFivetranConnector($o: fivetran_connectors_insert_input!) {\n insert_fivetran_connectors_one(\n object: $o, \n on_conflict: {\n constraint: connectors_pkey,\n update_columns: [setup_state, data]\n }) {\n id\n }\n}\n",
        "variables": "={\n \"o\": {\n \"data\": \"{{JSON.stringify($json[\"data\"])}}\"\n \"setup_state\": {{$json[\"data\"][\"status\"][\"setup_state\"]}},\n \"remote_id\": {{$json[\"data\"][\"id\"]}}\n }\n}",
        "operationName": "UpsertFivetranConnector",
        "headerParametersUi": {
          "parameter": [
            {
              "name": "x-hasura-admin-secret",
              "value": "={{ $env.LOGARY_M2M_HASURA_ADMIN_SECRET }}"
            }
          ]
        }
      },
      "name": "Insert Connector",
      "type": "n8n-nodes-base.graphql",
      "typeVersion": 1,
      "position": [
        940,
        130
      ]
    },

```

There’s a silent fail here:

> <https://github.com/n8n-io/n8n/blob/master/packages/nodes-base/nodes/GraphQL/GraphQL.node.ts#L245>

Perhaps this could be logged?

---

<div class="post-metadata">

**Author:** ![haf](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/haf/32/2401_2.png) [@haf](https://community.n8n.io/u/haf)\
**Post date:** [November 18, 2020, 10:58pm UTC](https://community.n8n.io/t/graphql-node-not-passing-variables/3069/2 "2020-11-18T22:58:00Z")

</div>

Solved by extending the logging to say what’s wrong instead of silently overwriting my variables.

---

<div class="post-metadata">

**Author:** ![jan](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/jan/32/9_2.png) [@jan](https://community.n8n.io/u/jan)\
**Post date:** [November 18, 2020, 11:03pm UTC](https://community.n8n.io/t/graphql-node-not-passing-variables/3069/3 "2020-11-18T23:03:20Z")

</div>

Great, thanks a lot. Got merged and will be released with the new version tomorrow.
