Build Status Notifications

Receive webhook alerts whenever GraphOS attempts to build a new supergraph schema


This feature is only available with a GraphOS Dedicated or Enterprise plan. You can test it out by signing up for a free GraphOS trial. To compare GraphOS feature support across all plan types, see the pricing page.
This feature is in preview. Your questions and feedback are highly valueddon't hesitate to get in touch with your Apollo contact .

Configure GraphOS to send notifications to a webhook whenever GraphOS attempts to build a new supergraph schema for your federated graph. Notifications indicate whether the build succeeded. Successful build notifications include a temporary URL to the new supergraph schema.

Setup

  1. Go to your graph's Settings page in GraphOS Studio .
  2. Open the Reporting tab.
  3. Click Add notification in the upper right.
  4. Select Build Status and click Next.
  5. In the dropdown, select which graph variant you want to receive notifications for.
  6. Select either an existing notification channel or select which type of new channel you want to configure. Click Next.
  7. If you're configuring a new channel, complete the steps in the next section.

Configure 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.

  1. 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.

  2. In the Webhook URL input, provide the URL of your HTTP(S) endpoint.

  3. 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:

JavaScript
1interface BuildError {
2  message: string;
3  locations: ReadonlyArray<Location>;
4}
5
6interface Location {
7  line: number;
8  column: number;
9}
10
11interface ResponseShape {
12  eventType: 'BUILD_PUBLISH_EVENT';
13  eventID: string;
14  supergraphSchemaURL: string | undefined;
15  buildSucceeded: boolean;
16  buildErrors: BuildError[] | undefined;
17  graphID: string;
18  variantID: string;
19  timestamp: string;
20}

Field descriptions

Field Description
eventType
The build status event name; currently, always BUILD_PUBLISH_EVENT
eventId
A unique event ID
supergraphSchemaURL
If the build succeeded, a short-lived (24-hour) URL that enables you to fetch the supergraph schema without authenticating (such as with an API key).If the build fails, this field isn't present.
buildSucceeded
Whether or not the build succeeded
buildErrors
If the build failed, an array of builderError objects that describe the errors that occurred during the build.If the build succeeded, this field isn't present.
graphID
A unique graph ID
variantID
An unique ID in the graph ref format graphID@variantName
timestamp
An ISO 8601 Date string indicating when the event occurred