Schema Change Notifications
Receive alerts when changes are made to your graph's schema
Configure GraphOS to notify your team whenever your graph's registered schema changes. You can receive notifications via Slack, custom webhook, or both.
Setup
- Go to your graph's Settings page in GraphOS Studio.
- Open the Reporting tab.
- Click Add notification in the upper right.
- Select Schema Change and click Next.
- In the dropdown, select which graph variant you want to receive notifications for.
- Select either an existing notification channel or select which type of new channel you want to configure. Click Next.
- If you're configuring a new channel, complete the steps in the next section.
Configure a new channel
Slack
To set up Slack notifications, you must:
Create an incoming webhook in Slack.
Provide that webhook's URL to GraphOS Studio.
1. Create an incoming Slack hook
To create an incoming Slack hook:
From the Incoming Hooks page of the Slack App Directory, sign in and click Add to Slack.
Select the Slack channel that should receive notifications. Then, click Add Incoming WebHooks integration.
Copy the Webhook URL to use in the next step. It should have a format like
https://hooks.slack.com/services/...
.
You can repeat this process to create webhook URLs for different Slack channels.
2. Provide the Slack hook to Studio
In GraphOS Studio, specify a name for this notification channel in the Channel Name field.
This name must be unique among your graph's notification channels.
This name doesn't have to match the name of the Slack channel, but it's recommended for simplicity.
In the Slack Webhook URL field, paste the webhook URL you obtained in Create an incoming Slack hook.
Click Next.
After you finish setup, check that your Slack channel gets a confirmation from Studio.
To configure multiple Slack channels, repeat this process. Use a different webhook URL for each channel.
Webhook
Custom webhooks require you to set up an HTTPS endpoint accessible via
the public internet. GraphOS sends webhook notifications to this
endpoint as POST
requests. Notification details are
provided as JSON in the request body, as described in the next section.
Specify a name for this notification channel in the Channel Name field. This name must be unique among all your graph's notification channels, including Slack channels.
In the Webhook URL input, provide the URL of your HTTP(S) endpoint.
Click Next and complete any remaining steps in the dialog.
Webhook format
Custom webhook notification details are provided as a JSON object in the request body.
The JSON object conforms to the structure of the ResponseShape
interface:
1interface Change {
2 description: string;
3}
4
5interface ResponseShape {
6 eventType: 'SCHEMA_PUBLISH'
7 eventID: string;
8 changes: Change[];
9 schemaURL: string;
10 schemaURLExpiresAt: string;
11 graphID: string;
12 variantID: string;
13 timestamp: string;
14}
Field descriptions
Field | Description |
---|---|
| The schema change event; currently, always SCHEMA_PUBLISH |
| A unique event ID |
| The set of schema changes that occurred |
| A short-lived (24-hour) URL that enables you to fetch the published
schema without authenticating (such as with an API key). The URL expires
at the time indicated by schemaURLExpiresAt . |
| An ISO 8601 Date string indicating when the schemaURL expires |
| A unique graph ID |
| An unique ID in the graph ref format, for example, graphID@variantName |
| An ISO 8601 Date string indicating when the event occurred |