Rover CLI Migration
If you're currently using Apollo's rover CLI to compose and publish supergraph schemas, and are evaluating or using Inigo, then this tutorial demonstrates how to replace rover with Inigo's inigo CLI for the same functions.
Install the Inigo CLI
First, install the inigo CLI using your preferred method.
Local Schema Composition
rover
If you're using rover for local schema composition, the rover supergraph compose command is used like the following:
rover supergraph compose --config supergraph.yaml > supergraph.graphql
inigo
Inigo offers an equivalent inigo compose command that supports Apollo Federation:
inigo compose supergraph.yaml > supergraph.graphql
See the documentation for specifics on the YAML format used by inigo.
Checking and Linting a Subgraph for Managed Supergraph Schemas
Both Apollo GraphOS and Inigo support managed supergraph schemas that are composed automatically in the cloud when a subgraph schema change is published. Additionally, both GraphOS and Inigo support schema checks and linting of subgraphs before they are published.
rover (GraphOS)
GraphOS requires two separate commands for performing schema checks and linting:
rover subgraph check my-gateway@dev --name accounts --schema services/accounts/schema.graphql
rover subgraph lint my-gateway@dev --name accounts --schema services/accounts/schema.graphql
inigo
Inigo integrates both schema checks and linting into the check command.
inigo subgraph check my-gateway --label dev --subgraph accounts --schema services/accounts/schema.graphql --url http://localhost:4001/graphql
Publishing a Subgraph for Managed Supergraph Schemas
rover (GraphOS)
GraphOS requires a separate publish command to be run after the schema checks and linting are run.
rover subgraph publish my-gateway@dev --name accounts --schema services/accounts/schema.graphql --routing-url http://localhost:4001/graphql
inigo
When automatic publishing (the default setting) is enabled for an Inigo Checks, inigo subgraph apply will automatically perform the schema checks and publish the supergraph.
inigo subgraph apply my-gateway --label dev --subgraph accounts --schema services/accounts/schema.graphql --url http://localhost:4001/graphql
If automatic publishing is disabled, inigo publish can be run separately:
inigo publish my-gateway --label dev