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

docs: adds async checks docs #1193

Merged
merged 9 commits into from
Jul 28, 2022
10 changes: 7 additions & 3 deletions docs/source/ci-cd.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ jobs:
echo 'export PATH=$HOME/.rover/bin:$PATH' >> $BASH_ENV
- checkout
# after rover is installed, you can run it just like you would locally!
- run: rover graph check my-graph@prod --schema ./schema.graphql
# only run this command with the `--background` flag if you have the Apollo Studio GitHub integration enabled on your repository
- run: rover graph check my-graph@prod --schema ./schema.graphql --background
```

## GitHub Actions
Expand Down Expand Up @@ -124,9 +125,10 @@ jobs:
# Add Rover to the $GITHUB_PATH so it can be used in another step
# https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path
echo "$HOME/.rover/bin" >> $GITHUB_PATH
# only run this command with the `--background` flag if you have the Apollo Studio GitHub integration enabled on your repository
- name: Run check against prod
run: |
rover graph check my-graph@prod --schema ./test.graphql
rover graph check my-graph@prod --schema ./test.graphql --background

```

Expand Down Expand Up @@ -283,8 +285,10 @@ If you're running in a Node.js workflow, it might be easier to use the [NPM dist

You can use Rover by adding it to your `package.json` dependencies using [these instructions](./getting-started#npm-installer) and then execute it using npm scripts, similar to other workflows you might already have. If you don't want to install Rover as a dependency, you can run it with `npx` by using the `-p` flag:

_note: only run this command with the `--background` flag if you have the Apollo Studio GitHub integration enabled on your repository_

```bash
npx -p @apollo/rover rover graph check my-graph@prod --schema=./schema.graphql
npx -p @apollo/rover rover graph check my-graph@prod --schema=./schema.graphql --background
```

Since most commands require you be authenticated, see the above sections for instructions on how to add environment variables for your CI/CD provider.
4 changes: 4 additions & 0 deletions docs/source/commands/graphs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ As shown, arguments and options are similar to [`graph publish`](#graph-publish)

To configure the behavior of schema checks (such as the time range of past operations to check against), see the [documentation for schema checks](/studio/check-configurations/#using-apollo-studio-recommended).

#### Running checks in CI

If you want to run checks in CI, you may want to pass the `--background` flag to `rover graph check`. This flag will make Rover start the check in the background. If you have [connected Apollo Studio to your GitHub repository](/studio/github-integration/), it will detect the check and add its own status to your PR.

## Deleting a variant

### `graph delete`
Expand Down
4 changes: 4 additions & 0 deletions docs/source/commands/subgraphs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,10 @@ As shown, arguments and options are similar to [`subgraph publish`](#subgraph-pu

To configure the behavior of schema checks (such as the time range of past operations to check against), see the [documentation for schema checks](/studio/check-configurations/#using-apollo-studio-recommended).

#### Running checks in CI

If you want to run checks in CI, you may want to pass the `--background` flag to `rover subgraph check`. This flag will make Rover start the check in the background. If you have [connected Apollo Studio to your GitHub repository](/studio/github-integration/), it will detect the check and add its own status to your PR.

## Deleting a subgraph

### `subgraph delete`
Expand Down