Skip to main content
When the Subgraph Check Extension is triggered, your registered endpoint receives a request with a JSON payload containing information about the check. You can use this information to decide whether to discard the check or perform any additional linting on your subgraphs. If no option is enabled in the namespace configuration, no file is generated and the url field will be undefined or not present in the request payload.

SubgraphCheckExtensionPayload

FieldTypeDescription
actorIdstringThe unique identifier of the actor that triggered the check.
checkIdstringThe unique identifier of the check.
labelsLabelInfo[]Contains the labels used to trigger the check. This field will not be present when subgraphs is defined.
organizationOrganizationContextInformation about the organization that triggered the check.
namespaceNamespaceContextInformation about the associated namespace.
vcsContextVCSContextDetails about the Version Control System (VCS) that triggered the check. This field is only included when the check is initiated from a VCS.
affectedGraphsAffectedGraphInfo[]A list of all graphs affected by the check.
subgraphsSubgraphContext[]A list of all subgraphs that triggered the check. This field is only included when the check is for an existing subgraph.
urlstring or undefinedThe URL from which the bulk data file can be downloaded.
You can access the URL provided in the url field for 5 minutes after the request arrives.

LabelInfo

Provides information about the labels used to trigger the check.
FieldTypeDescription
keystringThe key of the label.
namestringThe name of the label.

OrganizationContext

Provides information about the organization that triggered the check.
FieldTypeDescription
idstringThe unique identifier of the organization.
slugstringThe slug of the organization.

NamespaceContext

Provides information about the associated namespace.
FieldTypeDescription
idstringThe unique identifier of the namespace.
namestringThe 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.
FieldTypeDescription
authorstringThe email address of the commit author.
commitShastringThe SHA hash of the commit that triggered the check.
branchstringThe branch name associated with the commit.

AffectedGraphInfo

Provides information about the graphs affected by the check.
FieldTypeDescription
idstringThe unique identifier of the graph.
namestringThe 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.
FieldTypeDescription
idstringThe unique identifier of the subgraph.
namestringThe name of the subgraph.
isDeletedbooleanIndicates whether the check was triggered by a deleted subgraph.

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;
}