From f11a38b9e88c429de29d88939d6d96d4037bf059 Mon Sep 17 00:00:00 2001 From: Stephen Barlow Date: Thu, 17 Jun 2021 13:44:51 -0700 Subject: [PATCH 1/2] Minor docs clarifications --- docs/source/graphs.md | 6 ++++-- docs/source/migration.md | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/docs/source/graphs.md b/docs/source/graphs.md index 34b630abb..aa1abee5d 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 [`rover graph introspect`](#fetching-via-introspection) to fetch a federated gateway's API schema. + +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 - ``` From 80a8486e1d8f6b5f5fa0aa2d2abd2167667583a8 Mon Sep 17 00:00:00 2001 From: Stephen Barlow Date: Thu, 17 Jun 2021 14:23:52 -0700 Subject: [PATCH 2/2] Incorporate feedback from @lennyburdette --- docs/source/graphs.md | 4 ++-- docs/source/subgraphs.md | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/source/graphs.md b/docs/source/graphs.md index aa1abee5d..f53689280 100644 --- a/docs/source/graphs.md +++ b/docs/source/graphs.md @@ -4,9 +4,9 @@ sidebar_title: 'graph' description: 'Publish and retrieve your API schema' --- -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 [`rover graph introspect`](#fetching-via-introspection) to fetch a federated gateway's API schema. +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). +> When interacting directly with a federated subgraph, instead use [`subgraph` commands](./subgraphs). ## Fetching a 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).