Join us from October 8-10 in New York City to learn the latest tips, trends, and news about GraphQL federation and API platform engineering.Join us for GraphQL Summit 2024 in NYC
Docs
Start for Free

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 valueddon't hesitate to get in touch with your Apollo contact.

Configure to send notifications to a webhook whenever GraphOS attempts to build a new 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:

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

FieldDescription
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 schema without authenticating (such as with an API key).

If the build fails, this 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 ID

variantID

An unique ID in the format graphID@variantName

timestamp

An ISO 8601 Date string indicating when the event occurred

Previous
Performance alerts
Rate articleRateEdit on GitHubEditForumsDiscord

© 2024 Apollo Graph Inc.

Privacy Policy

Company