Docs
Launch GraphOS Studio

Connecting Apollo to GitHub

Enhance schema checks with the Apollo Studio app for GitHub


To enhance the convenience and helpfulness of

, the
Apollo Studio app for GitHub
adds links to schema check results on the pull requests that initiate them:

GitHub status view

Install the GitHub application

Go to

and click Install it for free to add the app to the GitHub profile or organization that you want to set up checks for.

Configure Rover

If you haven't already,

in your development environment and
authenticate it with GraphOS
.

To display schema check results on pull requests correctly, you need to make sure associates the schema check execution with the pull request's HEAD commit, as opposed to the merge commit that GitHub adds. To guarantee this, set the APOLLO_VCS_COMMIT environment variable in your action's configuration, like so:

env:
APOLLO_VCS_COMMIT: ${{ github.event.pull_request.head.sha }}

Run a check on each commit

Next, make sure your CI configuration includes a step to execute . You do this by adding the rover subgraph check command directly as a step in your CI.

💡 TIP

For example CI configurations,

.

The rover subgraph check command checks for differences in your schema between what's on your current branch and the last version you uploaded to . If you've removed or changed any types or , the command checks whether those changes break any queries that your clients have made recently. If your changes do break any queries, the check fails.

Because you installed the Apollo Studio app on GitHub, the check you've added shows up as a line in your GitHub checks list. If there are changes in your schema, you can review them by clicking the Details link. By enabling in your continuous integration workflow (such as CircleCI), you're alerting developers of any potential problems directly in their pull requests, thereby giving them critical feedback where it's most useful.

Previous
Configure schema checks
Next
Overview
Edit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company