Skip to content
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

Merged
merged 13 commits into from
Mar 15, 2024
Merged

CLI plugin #1

merged 13 commits into from
Mar 15, 2024

Conversation

dmoverton
Copy link
Contributor

@dmoverton dmoverton commented Mar 13, 2024

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)

  • highlight
  • enhancement
  • bugfix
  • behaviour-change
  • performance-enhancement
  • security-fix

@dmoverton dmoverton marked this pull request as draft March 13, 2024 01:17
@dmoverton dmoverton requested a review from hallettj March 15, 2024 01:17
@dmoverton dmoverton marked this pull request as ready for review March 15, 2024 01:19
@dmoverton dmoverton added the ready-for-review PR is ready for review label Mar 15, 2024
Copy link
Collaborator

@hallettj hallettj left a 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"] }
Copy link
Collaborator

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.

@@ -0,0 +1,5 @@
pub mod api_type_conversions;
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@dmoverton dmoverton merged commit c84dd63 into main Mar 15, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request no-changelog-required ready-for-review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants