-
Notifications
You must be signed in to change notification settings - Fork 1
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
CLI plugin #1
CLI plugin #1
Conversation
nix configuration for CLI plugin
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
futures-util = "0.3.28" | ||
indexmap = { version = "1", features = ["serde"] } # must match the version that ndc-client uses | ||
serde = { version = "1.0", features = ["derive"] } | ||
serde_json = { version = "1.0.113", features = ["raw_value"] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something I often ask people to do is not to set exact dependency versions in Cargo.toml
- that's what Cargo.lock
is for. But it's less of a problem in a program vs a library.
crates/mongodb-connector/src/lib.rs
Outdated
@@ -0,0 +1,5 @@ | |||
pub mod api_type_conversions; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like maybe you added this file so you could import mongodb-connector
in the cli, but then decided not to, and forgot to delete this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's what happened. I'll delete the file.
Describe your changes
Adds a new
cli
crate with an executable designed to be used as a Hasura CLI connector plugin.Currently the cli plugin provides a single command
update
, which uses the validation schema from each collection (if there is one) to derive types and write a schema file that can be used by the MongoDB Connector.Issue ticket number and link
https://hasurahq.atlassian.net/browse/MDB-12
Type
(Select only one. In case of multiple, choose the most appropriate)