My Products
Help
omelhus
PARTNER

Please enable operation batching

by omelhus

It would make some tasks way easier for me. 🙂

4 REPLIES 4

by Marius Bancila

We put this on our backlog.

 

For the time being, there is a level of "batching" that you can do, by merging multiple queries into a single request (you cannot have both a query and a mutation though). Something like this:

query multiples
{
  company_1 : useCompany(no: ...)
  {
    request_1 : order
    {
      totalCount
    }
    
    request_2 :order(filter :{changedDate : {_gt : 20230606}})
    {
      totalCount
    }
    
    request_3 :order(filter :{orderNo : {_lt : 100}})
    {
      totalCount
    }
  }
  
  company_2 : useCompany(no: ...)
  {
    order
    {
      totalCount
    }
  }
}

Of course, you'll want to use variables, and this probably means you'll have a large number of variables. But you could probably also use a dictionary or array to handle the complexity.

omelhus
PARTNER

by omelhus

Thank you for adding it to the backlog. I'm already doing inline batching with lots of variables, but with "real" batching we'd get individual error handling for each operation.

by Marius Bancila

Please elaborate on the request.