Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

⏱ Increase timeout in batched cases #47

Open
DaniAcu opened this issue Aug 9, 2021 · 0 comments
Open

⏱ Increase timeout in batched cases #47

DaniAcu opened this issue Aug 9, 2021 · 0 comments

Comments

@DaniAcu
Copy link

DaniAcu commented Aug 9, 2021

I was exploring a case where we are using @apollo/client/link/batch-http.

In our case, we batched queries that have the same operation name. So we finally with an array of requests in a single HTTP request. Something like that

// request body

[
  { operationName: "SomeQuery",  variables: {} },
  { operationName: "SomeQuery",  variables: {} }
]

So, shouldn't we have been catching this case and increasing the timeout based on the number of queries? Because I feeling that we are setting up the timeout per query and in a batched case we are doing more than one so obviously this will take more time.

Maybe we could enable a flag to do that? Currently, we are increasing the timeout manually using the context.

Happy to contribute if it needs it and also hear other thoughts about it. 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant