# GraphQL Feetching Requests

**URL:** <https://discuss.workflowgen.com/t/graphql-feetching-requests/1541>\
**Category:** Integration\
**Created:** [December 19, 2019, 12:50pm UTC](https://discuss.workflowgen.com/t/graphql-feetching-requests/1541 "2019-12-19T12:50:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@sara](https://discuss.workflowgen.com/u/sara)\
**Post date:** [December 19, 2019, 12:50pm UTC](https://discuss.workflowgen.com/t/graphql-feetching-requests/1541/1 "2019-12-19T12:50:44Z")

</div>

Hello,

I need to find all the current requests that have a common data (customer number for example) which is an IN process data using GraphQl.

Is it possible ? Could you give me an example if yes?

Have a nice day,

Best Regards,  
Sara

---

<div class="post-metadata">

**Author:** ![eddy.daouk](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/eddy.daouk/32/672_2.png) [@eddy.daouk](https://discuss.workflowgen.com/u/eddy.daouk)\
**Post date:** [December 20, 2019, 2:57pm UTC](https://discuss.workflowgen.com/t/graphql-feetching-requests/1541/2 "2019-12-20T14:57:53Z")

</div>

Hi @sara,

Currently there are two ways:

1. You can run a query without filtering on the process name. This will return ALL the requests for ALL processes. Then, in your code, you can filter the results to only contain requests that have a customer number value.  
I recommend you keeping the page size to 100 and if you need to display more results, you can execute a second query to search for the second page.

```auto
{
  requests(filter:{status:OPEN}, page:{size:100, number: 1}){
    totalCount
    hasNextPage
    items{
      name,
      dataset(filter:{names:["CUSTOMER_NUMBER"]}){
        items{
          name
          textValue
        }
      }
    }
  }
}

```

1. Run multiple queries and aggregating all results. If you don’t have a lot of processes that contain that common data, it’s better to run queries only for those specific processes and merging the results afters, this way you don’t have to query unnecessary processes.

```auto
{
  requests(filter:{status:OPEN, processName:"PROCESS_NAME_1"}, page:{size:100, number: 1}){
    totalCount
    hasNextPage
    items{
      name,
      dataset(filter:{names:["CUSTOMER_NUMBER"]}){
        items{
          name
          textValue
        }
      }
    }
  }
}

```

Unfortunately there is no quick way to retrieve only the requests that have a value in this data. If the data is non existant or empty, it will return a null array or an empty value for request’s dataset.

Hope this helps,  
Eddy.

---

<div class="post-metadata">

**Author:** ![sara](https://avatars.discourse-cdn.com/v4/letter/s/a5b964/32.png) [@sara](https://discuss.workflowgen.com/u/sara)\
**Post date:** [December 23, 2019, 12:22pm UTC](https://discuss.workflowgen.com/t/graphql-feetching-requests/1541/3 "2019-12-23T12:22:13Z")

</div>

Thanks Eddy, Have a nice day !
