My Products
Help
omelhus
PARTNER

query does not execute in parallel

by omelhus

Hey,

 

I'm fetching all available companies for all customers in a single query, but for users with access to heaps of customers this is taking a lot of time.

 

It looks like that this query executes in sequence instead of parallel. Any suggestion on how I can fix this? It does seem like that executing it using batchRequest has the same issues.

 

In this sample I'm fetching the same over and over, but in my actual use case I'm fetching companies for all available customers. For each additional availableCompanies I add to the query, it adds around 100ms to the response time.

 

query availableCompanies {
  availableCompanies {
    items {
      vismaNetCompanyId
      name
      vismaNetCustomerId
      organizationNo
    }
  }
  a_2: availableCompanies {
    items {
      vismaNetCompanyId
      name
      vismaNetCustomerId
      organizationNo
    }
  }
  a_3: availableCompanies {
    items {
      vismaNetCompanyId
      name
      vismaNetCustomerId
      organizationNo
    }
  }
    a_4: availableCompanies {
    items {
      vismaNetCompanyId
      name
      vismaNetCustomerId
      organizationNo
    }
  }
}

 

0 REPLIES 0