graphql-engine/v3/crates/engine
Rakesh Emmadi 03c85f6985 Fix NDC relationship collection for filter predicates in nested relationship selection. (#924)
<!-- 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
2024-08-02 16:18:29 +00:00
..
benches Add flag to toggle whether to expose internal errors (#759) 2024-06-27 12:43:23 +00:00
bin/engine simplify the sql context that powers datafusion (#921) 2024-08-01 21:28:32 +00:00
src introduce AuthConfig v2, which removes role emulation (#891) 2024-07-29 09:18:18 +00:00
tests Fix NDC relationship collection for filter predicates in nested relationship selection. (#924) 2024-08-02 16:18:29 +00:00
build.rs Use Clippy to help simplify conditions. (#648) 2024-05-31 13:02:00 +00:00
Cargo.toml Implement NoAuth mode in AuthConfig (#877) 2024-07-25 15:49:26 +00:00