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.
To compare GraphOS feature support across all plan types, see the pricing page.
This feature is in preview. Your questions and feedback are highly valued—don'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
- Go to your graph's Settings page in GraphOS Studio.
- Open the Reporting tab.
- Click Add notification in the upper right.
- Select Build Status 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 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:
interface BuildError {message: string;locations: ReadonlyArray<Location>;}interface Location {line: number;column: number;}interface ResponseShape {eventType: 'BUILD_PUBLISH_EVENT';eventID: string;supergraphSchemaURL: string | undefined;buildSucceeded: boolean;buildErrors: BuildError[] | undefined;graphID: string;variantID: string;timestamp: string;}
Field descriptions
Field | Description |
---|---|
| The build status event name; currently, always |
| A unique event ID |
| 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. |
| Whether or not the build succeeded |
| If the build failed, an array of If the build succeeded, this field isn't present. |
| A unique graph ID |
| An unique ID in the graph ref format |
| An ISO 8601 Date string indicating when the event occurred |