mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
5d8333753d
## Description Aggregate response reshaping is where the computed aggregates are extracted from the NDC response and rewritten into the response GraphQL shape (usually a nested object structure). Previously this reshaping was precomputed and stored in the internal IR for the request and then passed through to the response reshaping code. At the time, this seemed smarter than re-walking the GraphQL annotation structure and reinterpreting it to know how to reshape the response, when we already do this at IR-creation time. However, this was too smart for its own good. 😭 Unfortunately, the necessary bits of the IR are not available when processing the an aggregate response inside a relationship field. What _is_ available is the GraphQL annotation structure. 🤦♂️ This PR reworks the aggregate response reshaping to solely use the GraphQL annotation structure and removes the precomputation code and related IR storage of it. This means the new reshaping code will be usable for the upcoming aggregate relationships implementation. And... it turns out that the new code actually cleaner and simpler than the old "clever" code anyway. This PR does not change any functionality. V3_GIT_ORIGIN_REV_ID: 59e29cdac396c094a35c1203c02a3f27ba2c4c58 |
||
---|---|---|
.. | ||
benches | ||
src | ||
tests | ||
Cargo.toml | ||
readme.md |
execute
Given an already resolved set of metadata, this crate is responsible for taking requests and executing them.