mirror of
https://github.com/hasura/graphql-engine.git
synced 2025-01-08 08:44:24 +03:00
7177a423da
<!-- The PR description should answer 2 (maybe 3) important questions: --> Closes: https://linear.app/hasura/issue/APIPG-397/support-remote-relationship-predicates-in-permission-filters ### What <!-- What is this PR trying to accomplish (and why, if it's not obvious)? --> <!-- Consider: do we need to add a changelog entry? --> Allow defining permission filters with remote relationships in their predicates. ### How <!-- How is it trying to accomplish it (what are the implementation steps)? --> - Lift metadata resolve restriction for remote relationships in permission predicates - Abstract out the remote relationship resolving logic, in query filter, into a new function and re-use it while resolving permission filters. - Tests: - A metadata build test to check the presence of essential equal operator on source fields in relationship mapping. - Ported all `select_many/relationship_predicate/`* tests to a new `select_many/remote_relationship_predicate/*` with appropriate metadata changes. --------- Co-authored-by: Anon Ray <ecthiender@users.noreply.github.com> V3_GIT_ORIGIN_REV_ID: 9c496ecdc9829ed626354ef85e776e1afcb0dfc7 |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
readme.md |
SQL Interface
An experimental SQL interface over OpenDD models. This is mostly targeted at AI use cases for now - GenAI models are better at generating SQL queries than GraphQL queries.
This is implemented using the Apache DataFusion Query Engine by deriving the SQL
metadata for datafusion from Open DDS metadata. As the implementation currently
stands, once we get a LogicalPlan
from datafusion we replace TableScan
s with
NDC queries to the underlying connector. There is a rudimentary optimizer that
pushes down projections to the ndc query so that we don't fetch all the columns
of a collection.