Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,16 @@
"studio/schema-explorer",
"studio/schema-registry",
"studio/schema-checks",
{
"group": "Check Extensions",
"icon": "puzzle-piece-simple",
"pages": [
"studio/subgraph-check-extensions",
"studio/sce/payload-structure",
"studio/sce/response-structure",
"studio/sce/file-content"
]
},
"studio/schema-contracts",
"studio/overrides",
"studio/changelog",
Expand Down
Binary file added docs/images/studio/sce/config.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
49 changes: 49 additions & 0 deletions docs/studio/sce/file-content.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
---
title: "Structure of "
sidebarTitle: Overview
icon: puzzle-piece-simple
description: "Validate schema changes before deploying them to production on your own premises."
---

```typescript
enum LintSeverity {
Warning = 0,
Error = 1
}

interface LintIssue {
lintRuleType: string;
severity: LintSeverity;
message: string;
issueLocation: {
line: number;
column: number;
endLine?: number;
endColumn?: number;
};
}

enum GraphPruningSeverity {
Warning = 0,
Error = 1
}

interface GraphPruningIssue {
graphPruningRuleType: string;
severity: GraphPruningSeverity;
fieldPath: string;
message: string;
issueLocation: {
line: number;
column: number;
endLine?: number;
endColumn?: number;
};
federatedGraphId: string;
federatedGraphName: string;
subgraphName?: string;
}

interface SubgraphCheckExtensionContent {
}
```
91 changes: 91 additions & 0 deletions docs/studio/sce/payload-structure.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: "Structure of "
sidebarTitle: Overview
icon: puzzle-piece-simple
description: "Validate schema changes before deploying them to production on your own premises."
---

## SubgraphCheckExtensionPayload
| Field | Description |
|----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------|
| actorId | The unique identifier of the actor that triggered the check. |
| checkId | The unique identifier of the check. |
| 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. |
| subgraph | The subgraph 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. |

### OrganizationContext
| Field | Description |
|-------|--------------------------------------------|
| id | The unique identifier of the organization. |
| slug | The slug of the organization. |

### NamespaceContext
| Field | Description |
|-------|-----------------------------------------|
| id | The unique identifier of the namespace. |
| name | The display name of the namespace. |

### VCSContext
| 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
| Field | Description |
|-------|-------------------------------------|
| id | The unique identifier of the graph. |
| name | The name of the graph. |

### SubgraphContext
| 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

```typescript
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 {
organization: OrganizationInfo;
namespace: NamespaceInfo;
vcsContext: VCSContext | undefined;
affectedGraphs: AffectedGraphInfo[];
url: string;
subgraph: SubgraphInfo | undefined;
}
```
27 changes: 27 additions & 0 deletions docs/studio/sce/response-structure.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
```typescript
enum LintSeverity {
Warning = 0,
Error = 1
}

interface LintIssue {
lintRuleType: string;
severity: LintSeverity;
message: string;
issueLocation: {
line: number;
column: number;
endLine?: number;
endColumn?: number;
};
}

interface Overwrite {
lintIssues: LintIssue[];
}

interface SubgraphCheckExtensionReply {
errorMessage: string | undefined;
overwrite: Overwrite | undefined;
}
```
Loading