Skip to content

Commit

Permalink
feat: adds rover install --plugin supergraph-{0,2} (#1058)
Browse files Browse the repository at this point in the history
fixes #1046. 

this PR adds `rover install --plugin supergraph-{0,2}` and removes `rover-fed2`.

the curl and npm installers will both run `rover install --plugin supergraph@latest-0` and `rover install --plugin supergraph@latest-2`. you can run `rover install --plugin supergraph@v2.0.0` to get an exact version.

`rover supergraph compose` will check if a new supergraph binary has been released and download that to use it for composition if it is available. these network checks can be skipped with `--skip-update` in order to use the plugins that were installed at the same time as rover. you can also specify `federation_version: =2.0.0` in `supergraph.yaml` to get an exact version that will only download the plugin once and won't check for updates unless the number changes.

the npm installer now puts rover in `~/node_modules/.bin` instead of `~/node_modules/binary-install/bin`, and sets `APOLLO_NODE_MODULES_BIN_DIR` so that rover knows where it lives and can install the supergraph binaries there as well.
  • Loading branch information
EverlastingBugstopper committed Apr 5, 2022
1 parent 7169402 commit 3e4781d
Show file tree
Hide file tree
Showing 37 changed files with 691 additions and 1,217 deletions.
188 changes: 58 additions & 130 deletions Cargo.lock

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

14 changes: 7 additions & 7 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,20 @@ members = [
"crates/sputnik",
"crates/timber",
"installers/binstall",
"plugins/rover-fed2"
]

[features]
default = ["composition-js"]

# Enable the deno-powered `supergraph compose` command.
# To build without `supergraph compose`, use the
# `--no-default-features` flag.
composition-js = ["harmonizer_fed_one"]
# this feature exists to enable composition
# notably, it is disabled for x86_64-unknown-linux-musl builds
# because of this GitHub issue: https://github.com/denoland/deno/issues/3711
composition-js = []

[dependencies]
# https://github.com/apollographql/federation-rs dependencies
apollo-federation-types = "0.2.1"
harmonizer_fed_one = { package = "harmonizer", version = "=0.35.3", optional = true }
apollo-federation-types = "0.4"
# apollo-federation-types = { path = "../federation-rs/apollo-federation-types" }

# workspace dependencies
binstall = { path = "./installers/binstall" }
Expand Down Expand Up @@ -76,6 +75,7 @@ reqwest = { version = "0.11", default-features = false, features = [
"blocking",
"json",
] }
semver = "1"
serde = "1.0"
serde_json = "1.0"
serde_yaml = "0.8"
Expand Down
3 changes: 2 additions & 1 deletion crates/rover-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ publish = false
houston = { path = "../houston" }

# https://github.com/apollographql/federation-rs dependencies
apollo-federation-types = "0.2.1"
apollo-federation-types = "0.4"
# apollo-federation-types = { path = "../../../federation-rs/apollo-federation-types" }

# crates.io deps
backoff = "0.4"
Expand Down
Loading

0 comments on commit 3e4781d

Please sign in to comment.