diff --git a/docs/source/graphs.md b/docs/source/graphs.md index 34b630abb..f53689280 100644 --- a/docs/source/graphs.md +++ b/docs/source/graphs.md @@ -4,7 +4,9 @@ sidebar_title: 'graph' description: 'Publish and retrieve your API schema' --- -> These commands are for graphs that do _not_ use [federation](https://www.apollographql.com/docs/federation/). When working with a federated graph, instead use the [`subgraph` comamand](./subgraphs). +These Rover commands are _primarily_ for interacting with monolithic graphs that do _not_ use [federation](https://www.apollographql.com/docs/federation/). However, you can also use them to fetch a federated gateway's API schema [from Apollo Studio](#fetching-from-apollo-studio) or [via introspection](#fetching-via-introspection). + +> When interacting directly with a federated subgraph, instead use [`subgraph` commands](./subgraphs). ## Fetching a schema @@ -26,7 +28,7 @@ The argument `my-graph@my-variant` in the example above specifies the ID of the ### Fetching via introspection -If you need to obtain a running GraphQL server's schema, you can use Rover to execute an introspection query on it. This is especially helpful if you're developing a GraphQL server that _doesn't_ define its schema via SDL, such as [`graphql-kotlin`](https://github.com/ExpediaGroup/graphql-kotlin). +If you need to obtain the schema of a running GraphQL server or federated gateway, you can use Rover to execute an introspection query on it. This is especially helpful if you're developing a GraphQL server that _doesn't_ define its schema via SDL, such as [`graphql-kotlin`](https://github.com/ExpediaGroup/graphql-kotlin). Use the `graph introspect` command, like so: diff --git a/docs/source/migration.md b/docs/source/migration.md index 82a12093b..7bc63c550 100644 --- a/docs/source/migration.md +++ b/docs/source/migration.md @@ -265,7 +265,7 @@ apollo service:push --serviceName users ## Rover ## # (no config file needed) -# globs don't work natively with Rover, so you can use `cat` to combine -# multiple files on *nix machines -cat *.graphql | rover subgraph publish my-graph@prod --name users --schema - +# globs don't work natively with Rover, so you can use a command like `awk 1` +# to combine multiple files on *nix machines +awk 1 *.graphql | rover subgraph publish my-graph@prod --name users --schema - ``` diff --git a/docs/source/subgraphs.md b/docs/source/subgraphs.md index da747bb9b..65777e93e 100644 --- a/docs/source/subgraphs.md +++ b/docs/source/subgraphs.md @@ -19,6 +19,8 @@ Rover commands that interact with subgraphs begin with `rover subgraph`. ## Fetching a subgraph schema +These commands enable you to fetch the schema for a single subgraph in a federated graph. To instead fetch your gateway's composed supergraph schema, use the corresponding [`rover graph` commands](./graphs/). + ### Fetching from Apollo Studio > This requires first [authenticating Rover with Apollo Studio](./configuring/#authenticating-with-apollo-studio).