graphql-engine/v3/crates/schema
David Overton 4f580c6152 Add support order by nested fields (#1001)
<!-- The PR description should answer 2 important questions: -->

### What

Add support for ordering by nested fields.

Example query:
```graphql
query MyQuery {
  InstitutionMany(order_by: { location: { city: Asc } }) {
    id
    location {
      city
      campuses
    }
  }
}
```

This will order by the value of the nested field `city` within the
`location` column.

<!-- 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? -->

### How

Extends GraphQL schema generation to register and then build GraphQL
input types for nested `OrderByExpression` metadata objects.

During IR generation, order by input arguments containing nested fields
are flattened out into the `field_path` property of NDC `OrderByTarget`.

### Limitations

Does not yet support `orderableRelationships`. I'll do that as as
separate PR.

<!-- How is it trying to accomplish it (what are the implementation
steps)? -->

V3_GIT_ORIGIN_REV_ID: 6f4b1e098e60ce7906167b3afcd62de3c8616660
2024-08-26 05:24:52 +00:00
..
bin/build-schema-from-metadata Refactor SQL layer to use OpenDD query IR (#925) 2024-08-05 23:38:19 +00:00
src Add support order by nested fields (#1001) 2024-08-26 05:24:52 +00:00
tests Move "test" job to Github Actions (#872) 2024-07-24 13:41:40 +00:00
Cargo.toml Move all dependency versions into the workspace file. (#734) 2024-06-20 12:25:55 +00:00
README.md Split schema into own crate (#556) 2024-05-10 12:28:22 +00:00

schema

Provides functions to resolve the Open DDS metadata, generate the GraphQL scehma from it, and execute queries against the schema.