hasura / ndc-graphql

NDC for GraphQL
Apache License 2.0
4 stars 1 forks source link

implement printSchemaAndCapabilities #10

Closed BenoitRanque closed 1 month ago

BenoitRanque commented 1 month ago

This PR implements the printSchemaAndCapabilities cli command, allowing local dev to skip starting a connector instance to update their connector link

We move the capabilities and schema generating code to the common crate so that this logic is shared between cli and server. Most of the code here isn't new, but the diff is large due to the code moving places.

Importantly, this code adds the ndc-sdk dependency to both the CLI and the common crate.

Not having this dependency was a key reason to have multiple crates, which made compiling the cli on multiple platforms easier. So, todo: check that cli builds work as expected despite this change ~

Edit: we've now removed the ndc-sdk dependency in common and ndc-graphql-cli. Instead, these now depend on ndc-models which is all we used the ndc-sdk dependency for.

This does mean that going forward, we'll need to update the ndc-models and ndc-sdk dependency in sync, so that we'll always depend on the same ndc-models version our current ndc-sdk version depends on.