Skip to content

Commit d2fbf31

Browse files
committed
Upgrade to ndc-spec@0.1.3
1 parent 3a205dd commit d2fbf31

File tree

4 files changed

+26
-19
lines changed

4 files changed

+26
-19
lines changed

Cargo.lock

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

crates/sdk/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ rustls = ["reqwest/rustls"]
2424
ndc-test = ["dep:ndc-test"]
2525

2626
[dependencies]
27-
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.2" }
28-
ndc-test = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.2", optional = true }
27+
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.3" }
28+
ndc-test = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.3", optional = true }
2929

3030
async-trait = "0.1.79"
3131
axum = { version = "0.6.20", features = ["http2"] }

crates/sdk/src/connector/example.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,13 +50,17 @@ impl Connector for Example {
5050

5151
async fn get_capabilities() -> JsonResponse<models::CapabilitiesResponse> {
5252
models::CapabilitiesResponse {
53-
version: "0.1.1".into(),
53+
version: "0.1.3".into(),
5454
capabilities: models::Capabilities {
5555
relationships: None,
5656
query: models::QueryCapabilities {
5757
variables: None,
5858
aggregates: None,
5959
explain: None,
60+
nested_fields: models::NestedFieldCapabilities {
61+
filter_by: None,
62+
order_by: None,
63+
},
6064
},
6165
mutation: models::MutationCapabilities {
6266
transactional: None,

crates/sdk/src/default_main.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ struct TestCommand {
8484
configuration: PathBuf,
8585
#[arg(long, value_name = "DIRECTORY", env = "HASURA_SNAPSHOTS_DIR")]
8686
snapshots_dir: Option<PathBuf>,
87+
#[arg(long)]
88+
no_validate_responses: bool,
8789
}
8890

8991
#[derive(Clone, Parser)]
@@ -92,6 +94,8 @@ struct ReplayCommand {
9294
configuration: PathBuf,
9395
#[arg(long, value_name = "DIRECTORY", env = "HASURA_SNAPSHOTS_DIR")]
9496
snapshots_dir: PathBuf,
97+
#[arg(long)]
98+
no_validate_responses: bool,
9599
}
96100

97101
#[derive(Clone, Parser)]
@@ -488,6 +492,7 @@ mod ndc_test_commands {
488492
seed: command.seed.map(|s| s.as_bytes().try_into()).transpose()?,
489493
snapshots_dir: command.snapshots_dir,
490494
gen_config: ndc_test::configuration::TestGenerationConfiguration::default(),
495+
options: ndc_test::configuration::TestOptions { validate_responses: !command.no_validate_responses }
491496
};
492497

493498
let connector = make_connector_adapter(setup, command.configuration).await?;
@@ -512,7 +517,9 @@ mod ndc_test_commands {
512517
let connector = make_connector_adapter(setup, command.configuration).await?;
513518
let mut reporter = (ConsoleReporter::new(), TestResults::default());
514519

515-
ndc_test::test_snapshots_in_directory(&connector, &mut reporter, command.snapshots_dir)
520+
let options = ndc_test::configuration::TestOptions { validate_responses: !command.no_validate_responses };
521+
522+
ndc_test::test_snapshots_in_directory(&options, &connector, &mut reporter, command.snapshots_dir)
516523
.await;
517524

518525
if !reporter.1.failures.is_empty() {

0 commit comments

Comments
 (0)