graphql-engine/v3/crates
Daniel Chambers df19b15bc8 Fix parallel execution of root fields (#607)
## Description
This PR fixes a bug where the engine does not actually execute root
fields in parallel when it is supposed to be doing so.

Consider the following GraphQL query that is invoking a typescript
function that sleeps for 5 seconds three times:

```graphql
query MyQuery {
  test1: app_hello(name: "test1")
  test2: app_hello(name: "test2")
  test3: app_hello(name: "test3")
}
```

This should execute in 5 seconds, as these should be run in parallel.
Instead, it actually takes 15 seconds as they are run sequentially.

Here's a trace from before the change:

![image](https://github.com/hasura/v3-engine/assets/1214352/d52d99e7-b4da-4bbb-bbf9-5155ef568d76)

And here's a trace from after the change:

![image](https://github.com/hasura/v3-engine/assets/1214352/26a3ac1f-9e9c-4067-aa1b-62aaa4b293c2)

## Changelog

### Product

_(Select all products this will be available in)_

- [x] community-edition
- [x] cloud
<!-- product : end : DO NOT REMOVE -->

### Type

<!-- See changelog structure:
https://github.com/hasura/graphql-engine-mono/wiki/Changelog-Guide#structure-of-our-changelog
-->

_(Select only one. In case of multiple, choose the most appropriate)_

- [ ] highlight
- [ ] enhancement
- [x] bugfix
- [ ] behaviour-change
- [ ] performance-enhancement
- [ ] security-fix
<!-- type : end : DO NOT REMOVE -->

### Changelog entry

<!--
  - Add a user understandable changelog entry
- Include all details needed to understand the change. Try including
links to docs or issues if relevant
  - For Highlights start with a H4 heading (#### <entry title>)
  - Get the changelog entry reviewed by your team
-->

Fixed a bug in the engine that prevented the parallel execution of query
root fields

<!-- changelog-entry : end : DO NOT REMOVE -->

<!-- changelog : end : DO NOT REMOVE -->

V3_GIT_ORIGIN_REV_ID: 2d4dd195037d49577608892fc6fa0237d8fd26c4
2024-05-23 08:19:42 +00:00
..
auth Bump schemars from 0.8.19 to 0.8.20 (#592) 2024-05-20 08:45:48 +00:00
custom-connector Add support for HTTP/2 to the custom connector. (#581) 2024-05-14 15:11:28 +00:00
engine No-op refactor routes related code in engine main.rs (#600) 2024-05-20 15:54:45 +00:00
execute Fix parallel execution of root fields (#607) 2024-05-23 08:19:42 +00:00
lang-graphql Bump schemars from 0.8.19 to 0.8.20 (#592) 2024-05-20 08:45:48 +00:00
metadata-resolve Remove data connector-specific information from resolved ObjectBooleanExpressionType (#604) 2024-05-22 09:28:54 +00:00
metadata-schema-generator Bump schemars from 0.8.19 to 0.8.20 (#592) 2024-05-20 08:45:48 +00:00
open-dds OpenDD types for new boolean expressions (#599) 2024-05-21 09:28:53 +00:00
schema Remove data connector-specific information from resolved ObjectBooleanExpressionType (#604) 2024-05-22 09:28:54 +00:00
utils [opendds-derive]: allow hiding enum variants from JSONSchema (#598) 2024-05-20 13:30:56 +00:00