这是indexloc提供的服务,不要输入任何密码
Skip to content

update for ndc-spec v0.2 #139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 37 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5ad4a80
update ndc-models dependency
hallettj Dec 13, 2024
9b6f88d
propagate arguments for OrderByTarget::Column
hallettj Dec 17, 2024
0a5f887
progress
hallettj Dec 18, 2024
0445723
update plan_for_order_by_element, captures arguments
hallettj Dec 18, 2024
263187b
progress
hallettj Dec 18, 2024
d33fc52
plan for ExistsInCollection::NestedScalarCollection
hallettj Dec 19, 2024
68046fd
progress
hallettj Dec 19, 2024
d45724f
updates for expanded comparison operator definition enum
hallettj Dec 20, 2024
1be4b8e
updates to mongo-specific expression generation
hallettj Dec 21, 2024
86b7da5
updates for generating mongodb query predicates
hallettj Dec 21, 2024
f65bc1b
some small fixups
hallettj Dec 21, 2024
7ae735a
updated a bunch of things
hallettj Jan 6, 2025
18260f8
crates compile, but not tests
hallettj Jan 7, 2025
7e9f7e9
test fixes
hallettj Jan 7, 2025
f0ec6fe
test updates
hallettj Jan 8, 2025
7e50408
tests compile
hallettj Jan 8, 2025
7626efa
undo count result types switch from long to int - that should be anot…
hallettj Jan 8, 2025
9c5015e
adjust scalar capabilities to respect expected result types for stand…
hallettj Jan 8, 2025
c8d991d
update graphql-engine
hallettj Jan 10, 2025
704bcb0
update metadata for spec 0.2
hallettj Jan 10, 2025
2f5d7cd
accept strings as regex inputs for backward-compatibility
hallettj Jan 10, 2025
377bd0c
update plan to allow nullable results for relevant aggregates
hallettj Jan 10, 2025
0a7de7b
changed a test because comparing against a scalar array isn't set up …
hallettj Jan 10, 2025
23deb40
follow field path when computing left operand type for aggregate
hallettj Jan 10, 2025
0f93dbc
update bson-to-json to account for sum aggregate expecting long resul…
hallettj Jan 10, 2025
0cbb8b3
fix a unit tests, disable some tests pending named scopes feature
hallettj Jan 13, 2025
38db9b3
update changelog
hallettj Jan 13, 2025
c5fcfb8
fixtures for nested relationship
hallettj Jan 14, 2025
97215f2
we don't need the engine in the devshell
hallettj Jan 14, 2025
15d4e1a
test query on relationship using nested key
hallettj Jan 14, 2025
deb7ee9
clarify type representation comments
hallettj Jan 14, 2025
330e14a
tests for array comparisons
hallettj Jan 14, 2025
846a9fb
test exists in nested collection
hallettj Jan 15, 2025
65625d3
date values have time zones
hallettj Jan 15, 2025
351446d
we don't support query.nested_fields.nested_collections yet
hallettj Jan 15, 2025
da81c56
use nonempty type for relationship column mapping target path
hallettj Jan 21, 2025
0e48c81
Merge branch 'main' into jessehallett/eng-1351-test-ndc-spec-v02-in-m…
hallettj Jan 21, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,28 @@ This changelog documents the changes between release versions.

## [Unreleased]

### Changed

- **BREAKING:** Update to ndc-spec v0.2 ([#139](https://github.com/hasura/ndc-mongodb/pull/139))

#### ndc-spec v0.2

This database connector communicates with the GraphQL Engine using an IR
described by [ndc-spec](https://hasura.github.io/ndc-spec/). Version 0.2 makes
a number of improvements to the spec, and enables features that were previously
not possible. Highlights of those new features include:

- relationships can use a nested object field on the target side as a join key
- grouping result documents, and aggregating on groups of documents (pending implementation in the mongo connector)
- queries on fields of nested collections (document fields that are arrays of objects)
- filtering on scalar values inside array document fields - previously it was possible to filter on fields of objects inside arrays, but not on scalars

For more details on what has changed in the spec see [the
changelog](https://hasura.github.io/ndc-spec/specification/changelog.html#020).

Use of the new spec requires a version of GraphQL Engine that supports ndc-spec
v0.2, and there are required metadata changes.

## [1.6.0] - 2025-01-17

### Added
Expand Down
71 changes: 49 additions & 22 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,15 @@ resolver = "2"
# The tag or rev of ndc-models must match the locked tag or rev of the
# ndc-models dependency of ndc-sdk
[workspace.dependencies]
ndc-sdk = { git = "https://github.com/hasura/ndc-sdk-rs.git", tag = "v0.4.0" }
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.6" }
ndc-sdk = { git = "https://github.com/hasura/ndc-sdk-rs.git", rev = "643b96b8ee4c8b372b44433167ce2ac4de193332" }
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.2.0-rc.2" }

indexmap = { version = "2", features = [
"serde",
] } # should match the version that ndc-models uses
itertools = "^0.12.1"
itertools = "^0.13.0"
mongodb = { version = "^3.1.0", features = ["tracing-unstable"] }
nonempty = "^0.11.0"
schemars = "^0.8.12"
serde = { version = "1", features = ["derive"] }
serde_json = { version = "1.0", features = ["preserve_order", "raw_value"] }
Expand Down
1 change: 1 addition & 0 deletions arion-compose/services/engine.nix
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ in
useHostStore = true;
command = [
"engine"
"--unstable-feature=enable-ndc-v02-support"
"--port=${port}"
"--metadata-path=${metadata}"
"--authn-config-path=${auth-config}"
Expand Down
2 changes: 1 addition & 1 deletion crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ indexmap = { workspace = true }
itertools = { workspace = true }
ndc-models = { workspace = true }
nom = { version = "^7.1.3", optional = true }
nonempty = "^0.10.0"
nonempty = { workspace = true }
pretty = { version = "^0.12.3", features = ["termcolor"], optional = true }
ref-cast = { workspace = true }
regex = "^1.11.1"
Expand Down
Loading