When the subgraph check extension is triggered, your registered endpoint will receive a request with a JSON payload
containing information about the check. You can use this information to decide whether you want to discard or perform
any additional linting on your subgraphs.
SubgraphCheckExtensionPayload
| Field | Description |
|---|
actorId | The unique identifier of the actor that triggered the check. |
checkId | The unique identifier of the check. |
labels | Contains the labels used to trigger the check. This field will not be present when subgraphs is |
organization | Information about the organization that triggered the check. |
namespace | Information about the associated namespace. |
vcsContext | Details about the Version Control System (VCS) that triggered the check. This field is only included when the check is initiated from a VCS. |
affectedGraphs | A list of all graphs affected by the check. |
subgraphs | A list of all the subgraphs that triggered the check. This field is only included when the check is for an existing subgraph. |
url | The URL from which the file containing bulk data can be downloaded. |
You will only be able to access the URL provided by the url field for 5 minutes after the request comes in.
LabelInfo
Provides information about the labels used to trigger the check.
| Field | Description |
|---|
| key | The key of the label. |
| name | The name of the label. |
OrganizationContext
Provides information about the organization that triggered the check.
| Field | Description |
|---|
| id | The unique identifier of the organization. |
| slug | The slug of the organization. |
NamespaceContext
Provides information about the associated namespace.
| Field | Description |
|---|
| id | The unique identifier of the namespace. |
| name | The display name of the namespace. |
VCSContext
Provides details about the Version Control System (VCS) that triggered the check. This field is only included when the check is initiated from a VCS.
| Field | Description |
|---|
| author | The email address of the commit author. |
| commitSha | The SHA hash of the commit that triggered the check. |
| branch | The name of the branch associated with the commit. |
AffectedGraphInfo
Provides information about the graphs affected by the check.
| Field | Description |
|---|
| id | The unique identifier of the graph. |
| name | The name of the graph. |
SubgraphContext
Provides information about the subgraphs that triggered the check. This field is only included when the check is for an existing subgraph.
| Field | Description |
|---|
| id | The unique identifier of the subgraph. |
| name | The name of the subgraph. |
| isDeleted | Indicates whether the check was triggered by a subgraph deletion. |
TypeScript definition
interface LabelInfo {
key: string;
name: string;
}
interface OrganizationInfo {
id: string;
slug: string;
}
interface NamespaceInfo {
id: string;
name: string;
}
interface VCSContext {
author: string;
commitSha: string;
branch: string;
}
interface AffectedGraphInfo {
id: string;
name: string;
namespace: NamespaceInfo;
}
interface SubgraphInfo {
id: string;
name: string;
isDeleted: boolean;
}
interface SubgraphCheckExtensionPayload {
actorId: string;
checkId: string;
labels: LabelInfo[] | undefined;
organization: OrganizationInfo;
namespace: NamespaceInfo;
vcsContext: VCSContext | undefined;
affectedGraphs: AffectedGraphInfo[];
url: string;
subgraphs: SubgraphInfo[] | undefined;
}