Skip to content

Commit

Permalink
Merge pull request #40 from hasura/use-ndc-sdk-for-print-schema
Browse files Browse the repository at this point in the history
use ndc-sdk for printSchemaAndCapabilities
  • Loading branch information
BenoitRanque authored Oct 30, 2024
2 parents dc444de + 3fc084c commit 4c9020d
Show file tree
Hide file tree
Showing 136 changed files with 175 additions and 159 deletions.
139 changes: 69 additions & 70 deletions Cargo.lock

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

8 changes: 8 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
members = [
"crates/ndc-clickhouse",
"crates/ndc-clickhouse-cli",
"crates/ndc-clickhouse-core",
"crates/common",
]
resolver = "2"

package.version = "1.0.5"
package.edition = "2021"

[workspace.dependencies]
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.6" }
ndc-sdk = { git = "https://github.com/hasura/ndc-sdk-rs", tag = "v0.5.0", package = "ndc-sdk", features = [
"rustls",
], default-features = false }
ndc-sdk-core = { git = "https://github.com/hasura/ndc-sdk-rs", tag = "v0.5.0", package = "ndc-sdk-core", default-features = false }

# insta performs better in release mode
[profile.dev.package]
insta.opt-level = 3
Expand Down
6 changes: 3 additions & 3 deletions crates/common/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,10 @@ pub fn get_connection_configuration(
}

pub async fn read_server_config(
configuration_dir: impl AsRef<Path> + Send,
configuration_dir: &Path,
environment: &ConfigurationEnvironment,
) -> Result<ServerConfig, ConfigurationError> {
let file_path = configuration_dir.as_ref().join(CONFIG_FILE_NAME);
let file_path = configuration_dir.join(CONFIG_FILE_NAME);

let connection = get_connection_configuration(environment)?;

Expand Down Expand Up @@ -259,7 +259,7 @@ pub async fn read_server_config(
let mut queries = BTreeMap::new();

for (query_alias, query_config) in config.queries.clone() {
let query_file_path = configuration_dir.as_ref().join(&query_config.file);
let query_file_path = configuration_dir.join(&query_config.file);
let file_content =
fs::read_to_string(&query_file_path)
.await
Expand Down
4 changes: 3 additions & 1 deletion crates/ndc-clickhouse-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ edition.workspace = true
[dependencies]
clap = { version = "4.5.3", features = ["derive", "env"] }
common = { path = "../common" }
ndc-models = { git = "http://github.com/hasura/ndc-spec.git", tag = "v0.1.6" }
ndc-models = { workspace = true }
ndc-sdk-core = { workspace = true }
ndc-clickhouse-core = { path = "../ndc-clickhouse-core" }
reqwest = { version = "0.12.3", features = [
"json",
"rustls-tls",
Expand Down
Loading

0 comments on commit 4c9020d

Please sign in to comment.