Async Batched Queries
@tlaverdure is already working on this.
Since Aug 17, 2021.
- Dominant language
- PHP
- Stars
- 3.5k
- Forks
- 468
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 2
Description
What problem does this feature proposal attempt to solve?
It looks like webonyx/graphql-php can fetch data asynchronously. https://webonyx.github.io/graphql-php/data-fetching/#async-php
I'm not sure if batched queries are currently executed synchronously or asynchronously, but I could imagine there would be great performance benefits if they were resolved asynchronously. @spawnia could you confirm? It looks like you have been working on the ReactPromiseAdapter recently and I'm not sure if that is related. 👀
Which possible solutions should be considered?
I assume we could allow an alternate path for execution here if we wanted to use promiseToExecute():
https://github.com/nuwave/lighthouse/blob/985d39e4c0a513453e964bb1e04a97252d8e9665/src/GraphQL.php#L159-L165
And I'm also naively assuming that it should just work but let me know what you think.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.