Documentation
Schema Change Notifications

Schema Change Notifications

Stay up to date with changes in your GraphQL Schema. Receive notifications on Slack, Discord or even via WebHooks every time new changes are introduced.

Track what happens in your Production, Staging or QA environments.

⚠️
Available only in GitHub Application.

How does it Work?

Every pushed commit is checked by GraphQL Inspector. If changes are detected, it sends a notification to your Slack or Discord.

You can exactly specify which environments Inspector should track.

Configuration

Enabling schema change notifications is pretty straightforward. You need to define one of the targets: Slack, Discord or generic webhook.

notifications:
  slack: 'your-slack-webhook'
  discord: 'your-discord-webhook'
  webhook: 'your-own-webhook'

Using with Environments

Notifications are highly customizable. You’re able to have a setup where every schema change on any of your environments is sent via webhook. To reduce the noise, you can setup Slack notifications only for production environment.

notifications:
  webhook: 'your-own-webhook'
env:
  production:
    branch: 'master'
    notifications:
      slack: '<slack-webhook>'
  dev:
    branch: 'develop'

Whenever a new change is pushed to the develop branch, you get a notification via Webhook but not on Slack.

Notifications on Slack

To use Slack notifications, you need to create your own application on Slack and an Incoming Webhook. Follow these instructions.

notifications:
  slack: 'https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX'

Notifications on Slack

Notifications on Discord

Same story as with Slack. You need to create a webhook first, following these instructions and pass it to

notifications:
  discord: 'https://discordapp.com/api/webhooks/XXXXXX/XXXXXX'

Notifications on Discord

Notifications via Webhook

For more advanced cases, you may want to use the Webhook option.

notifications:
  webhook: 'https://your-app.com/webhooks/schema-changes'

From now on, every change in your schema will pass through the webhook. You can integrate it with other tools, send to internal applications and do pretty much whatever you can imagine.

Payload Structure

The structure of the received payload is described as GraphQL.

type Payload {
  environment: String!
  name: String
  changes: [Change!]
}
 
type Change {
  message: String!
  level: Level!
}
 
enum Level {
  Breaking
  Dangerous
  Safe
}

Example Payload

{
  "environment": "production",
  "changes": [
    {
      "message": "Field 'user' was removed from object type 'Query'",
      "level": "breaking"
    },
    {
      "message": "Argument 'limit: Int' added to field 'Query.users'",
      "level": "dangerous"
    },
    {
      "message": "Field 'role' added to object type 'User'",
      "level": "safe"
    }
  ]
}