# Parsing GraphQL responses

**URL:** <https://forum.flowable.org/t/parsing-graphql-responses/5022>\
**Category:** Uncategorized\
**Created:** [December 9, 2019, 2:02am UTC](https://forum.flowable.org/t/parsing-graphql-responses/5022 "2019-12-09T02:02:20Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![aornugent](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@aornugent](https://forum.flowable.org/u/aornugent)\
**Post date:** [December 9, 2019, 2:02am UTC](https://forum.flowable.org/t/parsing-graphql-responses/5022/1 "2019-12-09T02:02:20Z")

</div>

Hia,

Does anyone have suggestions for parsing GraphQL formatted JSON into something I can use in a dropdown list?

I’ve so far been using REST APIs and the `modeler-ui` app but could learn how to add custom java to a docker container if need be?

e.g:

```
{
  "data": {
    "allUsers": [
      {
        "id": "ck1d2h7ug042o01789cc2p88f",
        "name": "hahahaahah"
      },
      {
      ...,
      }
    ]
  }
}
```

---

<div class="post-metadata">

**Author:** ![Florian\_Faist](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/florian_faist/32/635_2.png) [@Florian\_Faist](https://forum.flowable.org/u/Florian_Faist)\
**Post date:** [December 11, 2019, 7:22am UTC](https://forum.flowable.org/t/parsing-graphql-responses/5022/2 "2019-12-11T07:22:43Z")

</div>

I am also interested in parsing json with flowable expression language.

Is there any example ?

---

<div class="post-metadata">

**Author:** ![aornugent](https://avatars.discourse-cdn.com/v4/letter/a/73ab20/32.png) [@aornugent](https://forum.flowable.org/u/aornugent)\
**Post date:** [December 11, 2019, 9:49pm UTC](https://forum.flowable.org/t/parsing-graphql-responses/5022/3 "2019-12-11T21:49:01Z")

</div>

My crude approach so far has been to use some simple Groovy commands in a script task:

```
execution.setVariable("id", response.id);
execution.setVariable("name", response.name);

```

where response is the result of the HTTP (REST) task saved as a process variable. This only works for boxed JSON such as:

```
{
    "id": ["ck1d2h7ug042o01789cc2p88f],
    "name": ["hahahaahah],
}

```

so doesn’t help with the GraphQL format above.

---

<div class="post-metadata">

**Author:** ![filiphr](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.flowable.org/filiphr/32/315_2.png) [@filiphr](https://forum.flowable.org/u/filiphr)\
**Post date:** [December 13, 2019, 8:39am UTC](https://forum.flowable.org/t/parsing-graphql-responses/5022/4 "2019-12-13T08:39:57Z")

</div>

If you are using HTTP task and save the entire response as a variable then this is stored as a Jackson `JsonNode`. This means that in order to access the name of the first user you can try using `data.allUsers[0].name` (this is not tested)
