Skip to main content

SubgraphCheckExtensionContent

The fields listed below are all optional and can be included or excluded based on the namespace configuration.
FieldTypeDescription
subgraphsSubgraphInfo[] or undefinedA list of subgraphs that trigger the check.
compositionsCompositionInfo[] or undefinedA list of all compositions produced by the check.
lintIssuesLintIssues[] or undefinedA list containing all the lint issues detected based on the Lint Policies.
graphPruningIssuesGraphPruningIssues[] or undefinedA list containing all the graph pruning issues detected based on the Graph Pruning Policies
schemaChangesSchemaChangeInfo[] or undefinedA list containing all the changes detected by the check.
affectedOperationsAffectedOperationInfo[] or undefinedA list containing all the operations affected by the check.

SubgraphInfo

FieldTypeDescription
idstringThe unique identifier of the subgraph.
namestringThe name of the subgraph.
oldComposedSdlstring or undefined
newComposedSdlstring or undefined

CompositionInfo

FieldTypeDescription
idstringThe unique identifier of the composition.
namestringThe name of the composition.
composedSchemastringThe composed SDL schema.
federatedClientSchemastringThe composed schema for the Federated Client.
subgraphsCompositionSubgraphInfo[]A collection of all subgraphs that contributed to this composition.

CompositionSubgraphInfo

FieldTypeDescription
idstringThe unique identifier of the subgraph.
namestringThe name of the subgraph.
sdlstringThe SDL of the subgraph.

LintIssue

FieldTypeDescription
lintRuleTypestringOne of the lint rule.
severityLintSeverityThe severity of the issue.
messagestringA message describing the issue.
issueLocationLintIssueLocationThe location of the issue related to the schema.

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.

GraphPruningIssue

FieldTypeDescription
graphPruningRuleTypeGraphPruningRuleTypeThe graph pruning rule.
severityGraphPruningSeverityThe severity of the issue.
fieldPathstringThe path to the field.
messagestringA message describing the issue.
issueLocationGraphPruningIssueLocationThe location of the issue related to the schema.
federatedGraphIdstringThe unique identifier of the Federated graph.
federatedGraphNamestringThe name of the Federated graph.
subgraphNamestring or undefinedThe name of the subgraph.

GraphPruningRuleType

ValueDescription
UNUSED_FIELDSRepresents a graph pruning issue related to a federated graph.
DEPRECATED_FIELDSRepresents a graph pruning issue related to a subgraph.
REQUIRE_DEPRECATION_BEFORE_DELETIONRepresents a graph pruning issue related to a subgraph.

GraphPruningSeverity

FieldValueDescription
Warning0Represents a graph pruning warning.
Error1Represents a graph pruning error.

GraphPruningIssueLocation

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

SchemaChangeInfo

FieldTypeDescription
messagestringA string representation of the change.
changeTypestringA string representing the type of change. You can find the possible values here.
pathstringThe path to the schema change.
isBreakingbooleanA value indicating whether the detected change is considered breaking or not.

List of possible change types

  • FIELD_ARGUMENT_DESCRIPTION_CHANGED
  • FIELD_ARGUMENT_DEFAULT_CHANGED
  • FIELD_ARGUMENT_TYPE_CHANGED
  • DIRECTIVE_REMOVED
  • DIRECTIVE_ADDED
  • DIRECTIVE_DESCRIPTION_CHANGED
  • DIRECTIVE_LOCATION_ADDED
  • DIRECTIVE_LOCATION_REMOVED
  • DIRECTIVE_ARGUMENT_ADDED
  • DIRECTIVE_ARGUMENT_REMOVED
  • DIRECTIVE_ARGUMENT_DESCRIPTION_CHANGED
  • DIRECTIVE_ARGUMENT_DEFAULT_VALUE_CHANGED
  • DIRECTIVE_ARGUMENT_TYPE_CHANGED
  • ENUM_VALUE_REMOVED
  • ENUM_VALUE_ADDED
  • ENUM_VALUE_DESCRIPTION_CHANGED
  • ENUM_VALUE_DEPRECATION_REASON_CHANGED
  • ENUM_VALUE_DEPRECATION_REASON_ADDED
  • ENUM_VALUE_DEPRECATION_REASON_REMOVED
  • FIELD_REMOVED
  • FIELD_ADDED
  • FIELD_DESCRIPTION_CHANGED
  • FIELD_DESCRIPTION_ADDED
  • FIELD_DESCRIPTION_REMOVED
  • FIELD_DEPRECATION_ADDED
  • FIELD_DEPRECATION_REMOVED
  • FIELD_DEPRECATION_REASON_CHANGED
  • FIELD_DEPRECATION_REASON_ADDED
  • FIELD_DEPRECATION_REASON_REMOVED
  • FIELD_TYPE_CHANGED
  • FIELD_ARGUMENT_ADDED
  • FIELD_ARGUMENT_REMOVED
  • INPUT_FIELD_REMOVED
  • INPUT_FIELD_ADDED
  • INPUT_FIELD_DESCRIPTION_ADDED
  • INPUT_FIELD_DESCRIPTION_REMOVED
  • INPUT_FIELD_DESCRIPTION_CHANGED
  • INPUT_FIELD_DEFAULT_VALUE_CHANGED
  • INPUT_FIELD_TYPE_CHANGED
  • OBJECT_TYPE_INTERFACE_ADDED
  • OBJECT_TYPE_INTERFACE_REMOVED
  • SCHEMA_QUERY_TYPE_CHANGED
  • SCHEMA_MUTATION_TYPE_CHANGED
  • SCHEMA_SUBSCRIPTION_TYPE_CHANGED
  • TYPE_REMOVED
  • TYPE_ADDED
  • TYPE_KIND_CHANGED
  • TYPE_DESCRIPTION_CHANGED
  • TYPE_DESCRIPTION_REMOVED
  • TYPE_DESCRIPTION_ADDED
  • UNION_MEMBER_REMOVED
  • UNION_MEMBER_ADDED
  • DIRECTIVE_USAGE_UNION_MEMBER_ADDED
  • DIRECTIVE_USAGE_UNION_MEMBER_REMOVED
  • DIRECTIVE_USAGE_ENUM_ADDED
  • DIRECTIVE_USAGE_ENUM_REMOVED
  • DIRECTIVE_USAGE_ENUM_VALUE_ADDED
  • DIRECTIVE_USAGE_ENUM_VALUE_REMOVED
  • DIRECTIVE_USAGE_INPUT_OBJECT_ADDED
  • DIRECTIVE_USAGE_INPUT_OBJECT_REMOVED
  • DIRECTIVE_USAGE_FIELD_ADDED
  • DIRECTIVE_USAGE_FIELD_REMOVED
  • DIRECTIVE_USAGE_SCALAR_ADDED
  • DIRECTIVE_USAGE_SCALAR_REMOVED
  • DIRECTIVE_USAGE_OBJECT_ADDED
  • DIRECTIVE_USAGE_OBJECT_REMOVED
  • DIRECTIVE_USAGE_INTERFACE_ADDED
  • DIRECTIVE_USAGE_INTERFACE_REMOVED
  • DIRECTIVE_USAGE_ARGUMENT_DEFINITION_ADDED
  • DIRECTIVE_USAGE_ARGUMENT_DEFINITION_REMOVED
  • DIRECTIVE_USAGE_SCHEMA_ADDED
  • DIRECTIVE_USAGE_SCHEMA_REMOVED
  • DIRECTIVE_USAGE_FIELD_DEFINITION_ADDED
  • DIRECTIVE_USAGE_FIELD_DEFINITION_REMOVED
  • DIRECTIVE_USAGE_INPUT_FIELD_DEFINITION_ADDED
  • DIRECTIVE_USAGE_INPUT_FIELD_DEFINITION_REMOVED

AffectedOperationInfo

FieldTypeDescription
schemaChangeIdstringThe unique identifier of the schema change.
hashstringThe unique hash of the operation.
namestringThe name of the operation.
typestringThe type of the operation.
firstSeenAtISO DateA Date with the ISO format indicating when the operation was first seen.
lastSeenAtISO DateA Date with the ISO format indicating when the operation was last seen.
isSafeOverridebooleanA value indicating whether it is safe for the operation to be overridden.
interface SubgraphInfo {
  id: string;
  name: string;
  oldComposedSdl?: string;
  newComposedSdl?: string;
}

interface CompositionInfo {
  id: string;
  name: string;
  composedSchema?: string;
  federatedClientSchema?: string;
  subgraphs: CompositionSubgraphInfo[];
}

interface CompositionSubgraphInfo {
  id: string;
  name: string;
  sdl: string;
}

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 GraphPruningIssue {
  graphPruningRuleType: string;
  severity: GraphPruningSeverity;
  fieldPath: string;
  message: string;
  issueLocation: GraphPruningIssueLocation;
  federatedGraphId: string;
  federatedGraphName: string;
  subgraphName?: string;
}

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

enum GraphPruningSeverity {
  Warning = 0,
  Error = 1
}

interface SchemaChangeInfo {
  message: string;
  changeType: string;
  path: string;
  isBreaking: boolean;
}

interface AffectedOperationInfo {
  schemaChangeId: string;
  hash: string;
  name: string;
  type: string;
  lastSeenAt: Date;
  firstSeenAt: Date;
  isSafeOverride: boolean;
}

interface SubgraphCheckExtensionContent {
  subgraphs?: SubgraphInfo[];
  compositions?: CompositionInfo;
  lintIssues?: LintIssue[];
  graphPruningIssues?: GraphPruningIssue[];
  schemaChanges?: SchemaChangeInfo[];
  affectedOperations?: AffectedOperationInfo[];
}