mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 17:31:56 +03:00
a72d45d165
This PR introduces support for multiple versions of the ndc-spec by adding a new `VersionedSchemaAndCapabilities` enum variant under the `DataConnectorLink` in OpenDD. This allows the capture of both ndc v0.1.* and v0.2.* schema and capabilities. This is achieved by referencing the `ndc-models` crate twice, once for `v0.1.4` and once for the first commit after `v0.1.4`. That commit was chosen to avoid actual v0.2.0 breaking changes for now, while we lay in this multiple version support plumbing. Future PRs will use a newer commit and adopt the breaking changes where necessary. The `VersionedSchemaAndCapabilities::V02` variant uses the the v0.2 reference of `ndc-models`. Then, during metadata resolve, when we resolve the `DataConnectorContext` from `DataConnectorLink`, we perform a migration of v0.1 types to v0.2 types and store and use the v0.2 types during metadata resolve. This migration is performed in the new module `ndc_migration`. We also record the `NdcVersion` (either `V01` or `V02`) in the `DataConnectorLink`. The `execute` crate will need to use this to determine which version to send to the connector at runtime (to be implemented in a future PR). The new changes to OpenDD are hidden from the JSON Schema via a new `UnstableFeatures` flag, and the use of the new variant is gated behind it in metadata resolve, since we don't yet support it upstream in the `execute` crate. V3_GIT_ORIGIN_REV_ID: d6d8a768ea3537c0b5e620799e94d3dd1e529526
33 lines
829 B
TOML
33 lines
829 B
TOML
[package]
|
|
name = "metadata-resolve"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
|
|
[lib]
|
|
bench = false
|
|
|
|
[dependencies]
|
|
hasura-authn-core = { path = "../auth/hasura-authn-core" }
|
|
lang-graphql = { path = "../lang-graphql" }
|
|
open-dds = { path = "../open-dds" }
|
|
|
|
derive_more = { workspace = true }
|
|
indexmap = { workspace = true, features = ["serde"] }
|
|
ndc-models = { workspace = true }
|
|
ndc-models-v01 = { workspace = true }
|
|
nonempty = { workspace = true }
|
|
ref-cast = { workspace = true }
|
|
reqwest = { workspace = true, features = ["json", "multipart"] }
|
|
schemars = { workspace = true }
|
|
serde = { workspace = true }
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
url = { workspace = true }
|
|
|
|
[dev-dependencies]
|
|
insta = { workspace = true, features = ["glob"] }
|
|
|
|
[lints]
|
|
workspace = true
|