Skip to main content
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

FieldDescription
actorIdThe unique identifier of the actor that triggered the check.
checkIdThe unique identifier of the check.
labelsContains the labels used to trigger the check. This field will not be present when subgraphs is
organizationInformation about the organization that triggered the check.
namespaceInformation about the associated namespace.
vcsContextDetails about the Version Control System (VCS) that triggered the check. This field is only included when the check is initiated from a VCS.
affectedGraphsA list of all graphs affected by the check.
subgraphsA list of all the subgraphs that triggered the check. This field is only included when the check is for an existing subgraph.
urlThe 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.
FieldDescription
keyThe key of the label.
nameThe name of the label.

OrganizationContext

Provides information about the organization that triggered the check.
FieldDescription
idThe unique identifier of the organization.
slugThe slug of the organization.

NamespaceContext

Provides information about the associated namespace.
FieldDescription
idThe unique identifier of the namespace.
nameThe 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.
FieldDescription
authorThe email address of the commit author.
commitShaThe SHA hash of the commit that triggered the check.
branchThe name of the branch associated with the commit.

AffectedGraphInfo

Provides information about the graphs affected by the check.
FieldDescription
idThe unique identifier of the graph.
nameThe 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.
FieldDescription
idThe unique identifier of the subgraph.
nameThe name of the subgraph.
isDeletedIndicates 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;
}