Skip to main content
When your server receives a request from the Subgraph Check Extension, it must respond with either 204 No Content, which indicates that nothing changed, or 200 OK with the structure described below. The response payload allows you to append a collection of LintIssues to the check, which will be displayed on the Check results page. You can also return a collection of error messages to be displayed in the extension’s UI. The response payload must be a JSON object no larger than 5 MB.

SubgraphCheckExtensionReply

FieldTypeDescription
errorsstring[] or undefinedAn optional collection of errors caught by the check extension. When one or more errors are returned, the subgraph check extension reports the result as a failure.
lintIssuesLintIssue[] or undefinedAn optional collection of lint issues that will be appended to the ones reported by the internal lint check. If you only want to see issues reported by your service, disable the Lint Policies.

LintIssue

FieldTypeDescription
lintRuleTypestringA string representing the Lint rule. This can be anything that helps you identify the applied rule.
severityLintSeverityThe severity of the issue.
messagestringA message providing context for the issue.
issueLocationLintIssueLocationThe location of the issue related to the schema. This helps highlight the issue on the check results screen.

LintSeverity

FieldValueDescription
Warning0Represents a lint warning.
Error1Represents a lint error.

LintIssueLocation

FieldTypeDescription
linenumberThe line number of the lint issue.
columnnumberThe column number of the lint issue.
endLinenumber or undefinedThe end line number of the lint issue.
endColumnnumber or undefinedThe end column number of the lint issue.

TypeScript definition

interface LintIssue {
  lintRuleType: string;
  severity: LintSeverity;
  message: string;
  issueLocation: LintIssueLocation;
}

interface LintIssueLocation {
  line: number;
  column: number;
  endLine?: number;
  endColumn?: number;
}

enum LintSeverity {
  Warning = 0,
  Error = 1
}

interface SubgraphCheckExtensionReply {
  errors?: string[];
  lintIssues?: LintIssue[];
}