Skip to content

Commit 432c0f1

Browse files
authored
Assume valid schema and SDL (#1508)
1 parent d50f85a commit 432c0f1

File tree

6 files changed

+15
-2
lines changed

6 files changed

+15
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
### vNEXT
44

55
- **github** skip diff checks for new branches and re-check once Pull Request is opened [#1493](https://github.com/kamilkisiela/graphql-inspector/issues/1493)
6+
- **action github cli ci loaders** - assume valid Schema and SDL [#1508](https://github.com/kamilkisiela/graphql-inspector/pull/1508)
67

78
### v2.0.0
89

packages/action/src/run.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,11 @@ export async function run() {
126126
const schemas = {
127127
old: buildSchema(sources.old, {
128128
assumeValid: true,
129+
assumeValidSDL: true,
129130
}),
130131
new: buildSchema(sources.new, {
131132
assumeValid: true,
133+
assumeValidSDL: true,
132134
}),
133135
};
134136

packages/core/__tests__/diff/schema.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -796,7 +796,8 @@ test('should work with with missing directive definitions', () => {
796796
bar: String! @md
797797
}
798798
`, {
799-
assumeValid: true
799+
assumeValid: true,
800+
assumeValidSDL: true,
800801
});
801802

802803
const schemaB = buildSchema(/* GraphQL */ `
@@ -805,7 +806,8 @@ test('should work with with missing directive definitions', () => {
805806
bar: String
806807
}
807808
`, {
808-
assumeValid: true
809+
assumeValid: true,
810+
assumeValidSDL: true,
809811
});
810812

811813
const changes = diff(schemaA, schemaB);

packages/github/src/schema-change-notifications.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,11 @@ export async function handleSchemaChangeNotifications({
8484
const schemas = {
8585
old: buildSchema(sources.old, {
8686
assumeValid: true,
87+
assumeValidSDL: true,
8788
}),
8889
new: buildSchema(sources.new, {
8990
assumeValid: true,
91+
assumeValidSDL: true,
9092
}),
9193
};
9294

packages/github/src/schema-diff.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,11 @@ export async function handleSchemaDiff({
127127
const schemas = {
128128
old: buildSchema(sources.old, {
129129
assumeValid: true,
130+
assumeValidSDL: true,
130131
}),
131132
new: buildSchema(sources.new, {
132133
assumeValid: true,
134+
assumeValidSDL: true,
133135
}),
134136
};
135137

packages/loaders/loaders/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ export class LoadersRegistry {
3434
): Promise<GraphQLSchema> {
3535
return loadSchema(pointer, {
3636
loaders: this.loaders,
37+
assumeValid: true,
38+
assumeValidSDL: true,
3739
...options,
3840
});
3941
}
@@ -44,6 +46,8 @@ export class LoadersRegistry {
4446
): Promise<Source[]> {
4547
return loadDocuments(pointer, {
4648
loaders: this.loaders,
49+
assumeValid: true,
50+
assumeValidSDL: true,
4751
...options,
4852
});
4953
}

0 commit comments

Comments
 (0)