mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
03c85f6985
<!-- The PR description should answer 2 important questions: --> ### What <!-- What is this PR trying to accomplish (and why, if it's not obvious)? --> <!-- Consider: do we need to add a changelog entry? --> <!-- Does this PR introduce new validation that might break old builds? --> <!-- Consider: do we need to put new checks behind a flag? --> Fixes a bug where queries with nested relationship selection and filter predicates fail due to an issue with NDC relationship collection. ```graphql query MyQuery { Album { AlbumId Title ArtistId Tracks { AlbumId Name TrackId } } } ``` A selection permission defined on the `Tracks` model with a relationship comparison in the predicate. ### How <!-- How is it trying to accomplish it (what are the implementation steps)? --> - Previously, the collection of relationships occurred independently by traversing through the IR AST. Consequently, during planning, the collection of local relationships was explicitly ignored. This caused confusion and resulted in the omission of relationship collectors when planning nested selections for local relationships, leading to the issue. - In this PR, the independent collection of relationships is removed. Instead, all NDC relationships for field selection, filter, and permission predicates are now collected during planning. This unifies the logic, and ensures consistency in achieving the same purpose. V3_GIT_ORIGIN_REV_ID: cbd5bfef7a90a7d7602061a9c733ac54b764e0d3 |
||
---|---|---|
.. | ||
benches | ||
bin/engine | ||
src | ||
tests | ||
build.rs | ||
Cargo.toml |