graphql-engine/v3/crates
Daniel Chambers f255b5e48a Nested relationships: Refactor capabilities, add engine test, fix docker compose engine metadata (#1341)
### What
This PR does three related things:
* Adds an execution test that tests that nested relationships work in
field selection in Postgres (taken from #935)
* Refactors the way capabilities are handled in metadata resolve to
account for difference between NDC 0.1.x and 0.2.x. Specifically, NDC
0.1.x connectors are assumed to support nested relationships in field
selection, but do not support them in filtering and ordering. Whereas in
NDC 0.2.x, a capability exists to indicate nested relationship support,
but then you must support them in filtering and ordering as well as
field selection.
* Updates the metadata used in the default docker compose so that it:
    * uses an up to date pg schema
    * uses BooleanExpressionType instead of ObjectBooleanExpression
    * removes commands that do not exist on the pg connector
* adds the Institutions model so that nested relationships can be tested

This PR does not add support for nested relationships in filtering or in
ordering. It also does not block nested relationships in field selection
for NDC 0.2.x connectors that do not support it. This will all come in
later PRs.

### How

In `metadata_resolve`, the resolved `DataConnector` used to contain a
copy of the `ndc_models::Capabilities`. This has been removed and
instead a `metadata_resolve` specific `DataConnectorCapabilities`
structure is used instead. This decouples `metadata_resolve` from
`ndc_models` and allows it to capture differences between NDC 0.1.x and
0.2.x properly.

There is now a specific function per NDC version that creates a
`DataConnectorCapabilities`. This removes the need for capabilities
migration code.

V3_GIT_ORIGIN_REV_ID: 0eb119aab0e5fa22977d84820025f75c6102036d
2024-11-13 12:28:29 +00:00
..
auth Stop Nix rebuilding (#1329) 2024-11-11 12:06:31 +00:00
compatibility Factor out jsonpath into its own crate (#1101) 2024-09-11 15:21:47 +00:00
custom-connector Stop Nix rebuilding (#1329) 2024-11-11 12:06:31 +00:00
engine Nested relationships: Refactor capabilities, add engine test, fix docker compose engine metadata (#1341) 2024-11-13 12:28:29 +00:00
execute wip: plan refactor type changes (part 1) (#1339) 2024-11-13 06:41:46 +00:00
graphql Nested relationships: Refactor capabilities, add engine test, fix docker compose engine metadata (#1341) 2024-11-13 12:28:29 +00:00
jsonapi Stop Nix rebuilding (#1329) 2024-11-11 12:06:31 +00:00
metadata-resolve Nested relationships: Refactor capabilities, add engine test, fix docker compose engine metadata (#1341) 2024-11-13 12:28:29 +00:00
metadata-schema-generator Stop Nix rebuilding (#1329) 2024-11-11 12:06:31 +00:00
open-dds metadata-resolve: disallow duplicate model root fields (#1322) 2024-11-11 14:41:45 +00:00
plan wip: plan refactor type changes (part 1) (#1339) 2024-11-13 06:41:46 +00:00
plan-types wip: plan refactor type changes (part 1) (#1339) 2024-11-13 06:41:46 +00:00
plugins Stop Nix rebuilding (#1329) 2024-11-11 12:06:31 +00:00
query-usage-analytics Stop Nix rebuilding (#1329) 2024-11-11 12:06:31 +00:00
sql Stop Nix rebuilding (#1329) 2024-11-11 12:06:31 +00:00
utils Stop Nix rebuilding (#1329) 2024-11-11 12:06:31 +00:00