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

Align on common parameter pattern for specifying graph and variant #99

Closed
abernix opened this issue Nov 25, 2020 · 1 comment
Closed
Labels
Milestone

Comments

@abernix
Copy link
Member

abernix commented Nov 25, 2020

As of https://github.com/apollographql/rover/releases/tag/v0.0.1-rc.0 there are variations in the way that "graph + variant" are provided as rover parameters. For example, the rover schema fetch command expects a <GRAPH_NAME> positional parameter with a --variant flag:

$ rover schema fetch
error: The following required arguments were not provided:
    <GRAPH_NAME>

USAGE:
    rover schema fetch <GRAPH_NAME> --log <log-level> --profile <profile-name> --variant <variant>

... while the rover partial delete command expects a --graph-name and a --graph-variant as flagged parameters (with no positional parameters):

$ rover partial delete
error: The following required arguments were not provided:
    --graph-name <graph-name>
    --service-name <service-name>

USAGE:
    rover partial delete --graph-name <graph-name> --log <log-level> --profile <profile-name> --service-name <service-name> --variant <variant>

... and the rover schema push command (which is in the same subcommand categorization as rover schema fetch in the first example from above), expects similarly flagged parameters but a <SCHEMA_PATH> as the lone positional parameter:

$ ./target/debug/rover schema push --help
rover-schema-push 0.0.1-rc.0
⬆️  Push a schema to Apollo Studio from a local file

USAGE:
    rover schema push [OPTIONS] <SCHEMA_PATH> --graph-name <graph-name>

I actually believe that rover schema fetch is the outlier here but, if <graph-name> is as important as I think it is to most of the commands in the partial and schema commands, I would claim that it should be the model and that we should always have the <graph-name> as the first positional parameter.

Thoughts? Discussion? (If this issue is closed and we resolve this later, we should at least align on one pattern, which I think means fixing rover schema fetch.)

@JakeDawkins
Copy link
Contributor

Closing because I didn't see this and started conversation on the duplicate #101 🤦

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants