Skip to content

Commit 01539cd

Browse files
daniel-chambershasura-bot
authored andcommitted
Upgrade ndc_models to v0.2.0-rc0 (#835)
This PR adds true support for ndc_models v0.2.0 to v3-engine. Note that v0.2.0 is not finalized yet, so we're pointing at v0.2.0-rc0. The support still comes via the migration methodology, where v0.2.x ndc models are downgraded to v0.1.x to support backwards compatibility. In the future we want to remove this and have the engine generate the different versioned ndc models separately instead of performing a migration. The ndc_models_v01 crate reference has been bumped to the official v0.1.5 version, which brings the newtypes to the v0.1.x version. The ndc_models crate reference is now on v0.2.0-rc0. The custom connector has been updated to support ndc-spec v0.2.0. All tests that talk to the custom connector have been updated with its latest v0.2.0 schema/capabilities. In `metadata_resolve` the v01->v02 schema/capabilities migration code has been updated to handle the new v0.2.0 types. This includes inferring v0.2.0 capabilities from what was possible in v0.1.x. In `execution`, the migration code has been updated to deal with the new v0.1.5 newtypes and v0.2.0 types. This means there are now cases where a downgrade is impossible and produces an error (see `NdcDowngradeError` in `execute::ndc::migration`). A bug has also been fixed where NDC expressions in arguments were not being serialized to the correct NDC version. V3_GIT_ORIGIN_REV_ID: 5b4afcde64c307b2bd7c985c588d6c74d9623a0f
1 parent b1be9fd commit 01539cd

File tree

23 files changed

+743
-365
lines changed

23 files changed

+743
-365
lines changed

v3/Cargo.lock

Lines changed: 15 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

v3/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ used_underscore_binding = "allow"
5454
private_intra_doc_links = "allow"
5555

5656
[workspace.dependencies]
57-
ndc-models = { git = "https://github.com/hasura/ndc-spec.git", rev = "f848c1e97a5b4410627a077420e79a9447ff97bf" }
58-
ndc-models-v01 = { package = "ndc-models", git = "https://github.com/hasura/ndc-spec.git", tag = "v0.1.4" }
57+
ndc-models = { git = "https://github.com/hasura/ndc-spec.git", tag = "v0.2.0-rc.0" }
58+
ndc-models-v01 = { package = "ndc-models", git = "https://github.com/hasura/ndc-spec.git", tag = "v0.1.5" }
5959

6060
anyhow = "1"
6161
apollo-parser = "0.7"

0 commit comments

Comments
 (0)