@graphql-inspector/cli 6.0.3-alpha-20251115021448-4c9c66ec66402949bd6e335f5b1862519fc3bea6 → 6.0.4-alpha-20251120234936-a610dbbf089ec9d85ff4ed1be60ed3ac2f019142

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -576,9 +576,9 @@ function directiveUsageAdded(kind, directive, payload, addedToNewType) {
576
576
  type: change_js_1.ChangeType.DirectiveUsageSchemaAdded,
577
577
  meta: {
578
578
  addedDirectiveName: directive.name.value,
579
- schemaTypeName: payload.getQueryType()?.name || '',
579
+ schemaTypeName: payload?.getQueryType()?.name || '',
580
580
  addedToNewType,
581
- directiveRepeatedTimes: directiveRepeatTimes(payload.astNode?.directives ?? [], directive),
581
+ directiveRepeatedTimes: directiveRepeatTimes(payload?.astNode?.directives ?? [], directive),
582
582
  },
583
583
  });
584
584
  }
@@ -731,8 +731,8 @@ function directiveUsageRemoved(kind, directive, payload) {
731
731
  type: change_js_1.ChangeType.DirectiveUsageSchemaRemoved,
732
732
  meta: {
733
733
  removedDirectiveName: directive.name.value,
734
- schemaTypeName: payload.getQueryType()?.name || '',
735
- directiveRepeatedTimes: directiveRepeatTimes(payload.astNode?.directives ?? [], directive),
734
+ schemaTypeName: payload?.getQueryType()?.name || '',
735
+ directiveRepeatedTimes: directiveRepeatTimes(payload?.astNode?.directives ?? [], directive),
736
736
  },
737
737
  });
738
738
  }
@@ -23,8 +23,8 @@ function schemaQueryTypeChangedFromMeta(args) {
23
23
  };
24
24
  }
25
25
  function schemaQueryTypeChanged(oldSchema, newSchema) {
26
- const oldName = (oldSchema.getQueryType() || {}).name || 'unknown';
27
- const newName = (newSchema.getQueryType() || {}).name || 'unknown';
26
+ const oldName = (oldSchema?.getQueryType() || {}).name || 'unknown';
27
+ const newName = (newSchema?.getQueryType() || {}).name || 'unknown';
28
28
  return schemaQueryTypeChangedFromMeta({
29
29
  type: change_js_1.ChangeType.SchemaQueryTypeChanged,
30
30
  meta: {
@@ -49,8 +49,8 @@ function schemaMutationTypeChangedFromMeta(args) {
49
49
  };
50
50
  }
51
51
  function schemaMutationTypeChanged(oldSchema, newSchema) {
52
- const oldName = (oldSchema.getMutationType() || {}).name || 'unknown';
53
- const newName = (newSchema.getMutationType() || {}).name || 'unknown';
52
+ const oldName = (oldSchema?.getMutationType() || {}).name || 'unknown';
53
+ const newName = (newSchema?.getMutationType() || {}).name || 'unknown';
54
54
  return schemaMutationTypeChangedFromMeta({
55
55
  type: change_js_1.ChangeType.SchemaMutationTypeChanged,
56
56
  meta: {
@@ -75,8 +75,8 @@ function schemaSubscriptionTypeChangedFromMeta(args) {
75
75
  };
76
76
  }
77
77
  function schemaSubscriptionTypeChanged(oldSchema, newSchema) {
78
- const oldName = (oldSchema.getSubscriptionType() || {}).name || 'unknown';
79
- const newName = (newSchema.getSubscriptionType() || {}).name || 'unknown';
78
+ const oldName = (oldSchema?.getSubscriptionType() || {}).name || 'unknown';
79
+ const newName = (newSchema?.getSubscriptionType() || {}).name || 'unknown';
80
80
  return schemaSubscriptionTypeChangedFromMeta({
81
81
  type: change_js_1.ChangeType.SchemaSubscriptionTypeChanged,
82
82
  meta: {
@@ -5,7 +5,7 @@ const graphql_js_1 = require("../../utils/graphql.js");
5
5
  const path_js_1 = require("../../utils/path.js");
6
6
  const change_js_1 = require("../changes/change.js");
7
7
  const safeUnreachable = ({ changes, oldSchema }) => {
8
- const reachable = (0, graphql_js_1.getReachableTypes)(oldSchema);
8
+ const reachable = oldSchema ? (0, graphql_js_1.getReachableTypes)(oldSchema) : new Set();
9
9
  return changes.map(change => {
10
10
  if (change.criticality.level === change_js_1.CriticalityLevel.Breaking && change.path) {
11
11
  const [typeName] = (0, path_js_1.parsePath)(change.path);
@@ -11,7 +11,7 @@ const suppressRemovalOfDeprecatedField = ({ changes, oldSchema, newSchema }) =>
11
11
  change.criticality.level === change_js_1.CriticalityLevel.Breaking &&
12
12
  change.path) {
13
13
  const [typeName, fieldName] = (0, path_js_1.parsePath)(change.path);
14
- const type = oldSchema.getType(typeName);
14
+ const type = oldSchema?.getType(typeName);
15
15
  if ((0, graphql_1.isObjectType)(type) || (0, graphql_1.isInterfaceType)(type)) {
16
16
  const field = type.getFields()[fieldName];
17
17
  if ((0, is_deprecated_js_1.isDeprecated)(field)) {
@@ -29,7 +29,7 @@ const suppressRemovalOfDeprecatedField = ({ changes, oldSchema, newSchema }) =>
29
29
  change.criticality.level === change_js_1.CriticalityLevel.Breaking &&
30
30
  change.path) {
31
31
  const [enumName, enumItem] = (0, path_js_1.parsePath)(change.path);
32
- const type = oldSchema.getType(enumName);
32
+ const type = oldSchema?.getType(enumName);
33
33
  if ((0, graphql_1.isEnumType)(type)) {
34
34
  const item = type.getValue(enumItem);
35
35
  if (item && (0, is_deprecated_js_1.isDeprecated)(item)) {
@@ -47,7 +47,7 @@ const suppressRemovalOfDeprecatedField = ({ changes, oldSchema, newSchema }) =>
47
47
  change.criticality.level === change_js_1.CriticalityLevel.Breaking &&
48
48
  change.path) {
49
49
  const [inputName, inputItem] = (0, path_js_1.parsePath)(change.path);
50
- const type = oldSchema.getType(inputName);
50
+ const type = oldSchema?.getType(inputName);
51
51
  if ((0, graphql_1.isInputObjectType)(type)) {
52
52
  const item = type.getFields()[inputItem];
53
53
  if (item && (0, is_deprecated_js_1.isDeprecated)(item)) {
@@ -65,7 +65,7 @@ const suppressRemovalOfDeprecatedField = ({ changes, oldSchema, newSchema }) =>
65
65
  change.criticality.level === change_js_1.CriticalityLevel.Breaking &&
66
66
  change.path) {
67
67
  const [typeName] = (0, path_js_1.parsePath)(change.path);
68
- const type = newSchema.getType(typeName);
68
+ const type = newSchema?.getType(typeName);
69
69
  if (!type) {
70
70
  return {
71
71
  ...change,
@@ -21,7 +21,7 @@ function diffSchema(oldSchema, newSchema) {
21
21
  changes.push(change);
22
22
  }
23
23
  changesInSchema(oldSchema, newSchema, addChange);
24
- (0, compare_js_1.compareLists)(Object.values(oldSchema.getTypeMap()).filter(t => !(0, graphql_js_1.isPrimitive)(t)), Object.values(newSchema.getTypeMap()).filter(t => !(0, graphql_js_1.isPrimitive)(t)), {
24
+ (0, compare_js_1.compareLists)(Object.values(oldSchema?.getTypeMap() ?? {}).filter(t => !(0, graphql_js_1.isPrimitive)(t) && !(0, graphql_js_1.isForIntrospection)(t)), Object.values(newSchema?.getTypeMap() ?? {}).filter(t => !(0, graphql_js_1.isPrimitive)(t) && !(0, graphql_js_1.isForIntrospection)(t)), {
25
25
  onAdded(type) {
26
26
  addChange((0, type_js_1.typeAdded)(type));
27
27
  changesInType(null, type, addChange);
@@ -33,7 +33,7 @@ function diffSchema(oldSchema, newSchema) {
33
33
  changesInType(type.oldVersion, type.newVersion, addChange);
34
34
  },
35
35
  });
36
- (0, compare_js_1.compareLists)(oldSchema.getDirectives(), newSchema.getDirectives(), {
36
+ (0, compare_js_1.compareLists)((oldSchema?.getDirectives() ?? []).filter(t => !(0, graphql_1.isSpecifiedDirective)(t)), (newSchema?.getDirectives() ?? []).filter(t => !(0, graphql_1.isSpecifiedDirective)(t)), {
37
37
  onAdded(directive) {
38
38
  addChange((0, directive_js_1.directiveAdded)(directive));
39
39
  (0, directive_js_2.changesInDirective)(null, directive, addChange);
@@ -45,7 +45,7 @@ function diffSchema(oldSchema, newSchema) {
45
45
  (0, directive_js_2.changesInDirective)(directive.oldVersion, directive.newVersion, addChange);
46
46
  },
47
47
  });
48
- (0, compare_js_1.compareDirectiveLists)(oldSchema.astNode?.directives || [], newSchema.astNode?.directives || [], {
48
+ (0, compare_js_1.compareDirectiveLists)(oldSchema?.astNode?.directives || [], newSchema?.astNode?.directives || [], {
49
49
  onAdded(directive) {
50
50
  addChange((0, directive_usage_js_1.directiveUsageAdded)(graphql_1.Kind.SCHEMA_DEFINITION, directive, newSchema, false));
51
51
  (0, directive_usage_js_1.directiveUsageChanged)(null, directive, addChange);
@@ -61,14 +61,14 @@ function diffSchema(oldSchema, newSchema) {
61
61
  }
62
62
  function changesInSchema(oldSchema, newSchema, addChange) {
63
63
  const oldRoot = {
64
- query: (oldSchema.getQueryType() || {}).name,
65
- mutation: (oldSchema.getMutationType() || {}).name,
66
- subscription: (oldSchema.getSubscriptionType() || {}).name,
64
+ query: (oldSchema?.getQueryType() || {}).name,
65
+ mutation: (oldSchema?.getMutationType() || {}).name,
66
+ subscription: (oldSchema?.getSubscriptionType() || {}).name,
67
67
  };
68
68
  const newRoot = {
69
- query: (newSchema.getQueryType() || {}).name,
70
- mutation: (newSchema.getMutationType() || {}).name,
71
- subscription: (newSchema.getSubscriptionType() || {}).name,
69
+ query: (newSchema?.getQueryType() || {}).name,
70
+ mutation: (newSchema?.getMutationType() || {}).name,
71
+ subscription: (newSchema?.getSubscriptionType() || {}).name,
72
72
  };
73
73
  if ((0, compare_js_1.isNotEqual)(oldRoot.query, newRoot.query)) {
74
74
  addChange((0, schema_js_1.schemaQueryTypeChanged)(oldSchema, newSchema));
@@ -545,9 +545,9 @@ export function directiveUsageAdded(kind, directive, payload, addedToNewType) {
545
545
  type: ChangeType.DirectiveUsageSchemaAdded,
546
546
  meta: {
547
547
  addedDirectiveName: directive.name.value,
548
- schemaTypeName: payload.getQueryType()?.name || '',
548
+ schemaTypeName: payload?.getQueryType()?.name || '',
549
549
  addedToNewType,
550
- directiveRepeatedTimes: directiveRepeatTimes(payload.astNode?.directives ?? [], directive),
550
+ directiveRepeatedTimes: directiveRepeatTimes(payload?.astNode?.directives ?? [], directive),
551
551
  },
552
552
  });
553
553
  }
@@ -700,8 +700,8 @@ export function directiveUsageRemoved(kind, directive, payload) {
700
700
  type: ChangeType.DirectiveUsageSchemaRemoved,
701
701
  meta: {
702
702
  removedDirectiveName: directive.name.value,
703
- schemaTypeName: payload.getQueryType()?.name || '',
704
- directiveRepeatedTimes: directiveRepeatTimes(payload.astNode?.directives ?? [], directive),
703
+ schemaTypeName: payload?.getQueryType()?.name || '',
704
+ directiveRepeatedTimes: directiveRepeatTimes(payload?.astNode?.directives ?? [], directive),
705
705
  },
706
706
  });
707
707
  }
@@ -15,8 +15,8 @@ export function schemaQueryTypeChangedFromMeta(args) {
15
15
  };
16
16
  }
17
17
  export function schemaQueryTypeChanged(oldSchema, newSchema) {
18
- const oldName = (oldSchema.getQueryType() || {}).name || 'unknown';
19
- const newName = (newSchema.getQueryType() || {}).name || 'unknown';
18
+ const oldName = (oldSchema?.getQueryType() || {}).name || 'unknown';
19
+ const newName = (newSchema?.getQueryType() || {}).name || 'unknown';
20
20
  return schemaQueryTypeChangedFromMeta({
21
21
  type: ChangeType.SchemaQueryTypeChanged,
22
22
  meta: {
@@ -41,8 +41,8 @@ export function schemaMutationTypeChangedFromMeta(args) {
41
41
  };
42
42
  }
43
43
  export function schemaMutationTypeChanged(oldSchema, newSchema) {
44
- const oldName = (oldSchema.getMutationType() || {}).name || 'unknown';
45
- const newName = (newSchema.getMutationType() || {}).name || 'unknown';
44
+ const oldName = (oldSchema?.getMutationType() || {}).name || 'unknown';
45
+ const newName = (newSchema?.getMutationType() || {}).name || 'unknown';
46
46
  return schemaMutationTypeChangedFromMeta({
47
47
  type: ChangeType.SchemaMutationTypeChanged,
48
48
  meta: {
@@ -67,8 +67,8 @@ export function schemaSubscriptionTypeChangedFromMeta(args) {
67
67
  };
68
68
  }
69
69
  export function schemaSubscriptionTypeChanged(oldSchema, newSchema) {
70
- const oldName = (oldSchema.getSubscriptionType() || {}).name || 'unknown';
71
- const newName = (newSchema.getSubscriptionType() || {}).name || 'unknown';
70
+ const oldName = (oldSchema?.getSubscriptionType() || {}).name || 'unknown';
71
+ const newName = (newSchema?.getSubscriptionType() || {}).name || 'unknown';
72
72
  return schemaSubscriptionTypeChangedFromMeta({
73
73
  type: ChangeType.SchemaSubscriptionTypeChanged,
74
74
  meta: {
@@ -2,7 +2,7 @@ import { getReachableTypes } from '../../utils/graphql.js';
2
2
  import { parsePath } from '../../utils/path.js';
3
3
  import { CriticalityLevel } from '../changes/change.js';
4
4
  export const safeUnreachable = ({ changes, oldSchema }) => {
5
- const reachable = getReachableTypes(oldSchema);
5
+ const reachable = oldSchema ? getReachableTypes(oldSchema) : new Set();
6
6
  return changes.map(change => {
7
7
  if (change.criticality.level === CriticalityLevel.Breaking && change.path) {
8
8
  const [typeName] = parsePath(change.path);
@@ -8,7 +8,7 @@ export const suppressRemovalOfDeprecatedField = ({ changes, oldSchema, newSchema
8
8
  change.criticality.level === CriticalityLevel.Breaking &&
9
9
  change.path) {
10
10
  const [typeName, fieldName] = parsePath(change.path);
11
- const type = oldSchema.getType(typeName);
11
+ const type = oldSchema?.getType(typeName);
12
12
  if (isObjectType(type) || isInterfaceType(type)) {
13
13
  const field = type.getFields()[fieldName];
14
14
  if (isDeprecated(field)) {
@@ -26,7 +26,7 @@ export const suppressRemovalOfDeprecatedField = ({ changes, oldSchema, newSchema
26
26
  change.criticality.level === CriticalityLevel.Breaking &&
27
27
  change.path) {
28
28
  const [enumName, enumItem] = parsePath(change.path);
29
- const type = oldSchema.getType(enumName);
29
+ const type = oldSchema?.getType(enumName);
30
30
  if (isEnumType(type)) {
31
31
  const item = type.getValue(enumItem);
32
32
  if (item && isDeprecated(item)) {
@@ -44,7 +44,7 @@ export const suppressRemovalOfDeprecatedField = ({ changes, oldSchema, newSchema
44
44
  change.criticality.level === CriticalityLevel.Breaking &&
45
45
  change.path) {
46
46
  const [inputName, inputItem] = parsePath(change.path);
47
- const type = oldSchema.getType(inputName);
47
+ const type = oldSchema?.getType(inputName);
48
48
  if (isInputObjectType(type)) {
49
49
  const item = type.getFields()[inputItem];
50
50
  if (item && isDeprecated(item)) {
@@ -62,7 +62,7 @@ export const suppressRemovalOfDeprecatedField = ({ changes, oldSchema, newSchema
62
62
  change.criticality.level === CriticalityLevel.Breaking &&
63
63
  change.path) {
64
64
  const [typeName] = parsePath(change.path);
65
- const type = newSchema.getType(typeName);
65
+ const type = newSchema?.getType(typeName);
66
66
  if (!type) {
67
67
  return {
68
68
  ...change,
@@ -1,6 +1,6 @@
1
- import { isEnumType, isInputObjectType, isInterfaceType, isObjectType, isScalarType, isUnionType, Kind, } from 'graphql';
1
+ import { isEnumType, isInputObjectType, isInterfaceType, isObjectType, isScalarType, isSpecifiedDirective, isUnionType, Kind, } from 'graphql';
2
2
  import { compareDirectiveLists, compareLists, isNotEqual, isVoid } from '../utils/compare.js';
3
- import { isPrimitive } from '../utils/graphql.js';
3
+ import { isForIntrospection, isPrimitive } from '../utils/graphql.js';
4
4
  import { directiveUsageAdded, directiveUsageChanged, directiveUsageRemoved, } from './changes/directive-usage.js';
5
5
  import { directiveAdded, directiveRemoved } from './changes/directive.js';
6
6
  import { schemaMutationTypeChanged, schemaQueryTypeChanged, schemaSubscriptionTypeChanged, } from './changes/schema.js';
@@ -18,7 +18,7 @@ export function diffSchema(oldSchema, newSchema) {
18
18
  changes.push(change);
19
19
  }
20
20
  changesInSchema(oldSchema, newSchema, addChange);
21
- compareLists(Object.values(oldSchema.getTypeMap()).filter(t => !isPrimitive(t)), Object.values(newSchema.getTypeMap()).filter(t => !isPrimitive(t)), {
21
+ compareLists(Object.values(oldSchema?.getTypeMap() ?? {}).filter(t => !isPrimitive(t) && !isForIntrospection(t)), Object.values(newSchema?.getTypeMap() ?? {}).filter(t => !isPrimitive(t) && !isForIntrospection(t)), {
22
22
  onAdded(type) {
23
23
  addChange(typeAdded(type));
24
24
  changesInType(null, type, addChange);
@@ -30,7 +30,7 @@ export function diffSchema(oldSchema, newSchema) {
30
30
  changesInType(type.oldVersion, type.newVersion, addChange);
31
31
  },
32
32
  });
33
- compareLists(oldSchema.getDirectives(), newSchema.getDirectives(), {
33
+ compareLists((oldSchema?.getDirectives() ?? []).filter(t => !isSpecifiedDirective(t)), (newSchema?.getDirectives() ?? []).filter(t => !isSpecifiedDirective(t)), {
34
34
  onAdded(directive) {
35
35
  addChange(directiveAdded(directive));
36
36
  changesInDirective(null, directive, addChange);
@@ -42,7 +42,7 @@ export function diffSchema(oldSchema, newSchema) {
42
42
  changesInDirective(directive.oldVersion, directive.newVersion, addChange);
43
43
  },
44
44
  });
45
- compareDirectiveLists(oldSchema.astNode?.directives || [], newSchema.astNode?.directives || [], {
45
+ compareDirectiveLists(oldSchema?.astNode?.directives || [], newSchema?.astNode?.directives || [], {
46
46
  onAdded(directive) {
47
47
  addChange(directiveUsageAdded(Kind.SCHEMA_DEFINITION, directive, newSchema, false));
48
48
  directiveUsageChanged(null, directive, addChange);
@@ -58,14 +58,14 @@ export function diffSchema(oldSchema, newSchema) {
58
58
  }
59
59
  function changesInSchema(oldSchema, newSchema, addChange) {
60
60
  const oldRoot = {
61
- query: (oldSchema.getQueryType() || {}).name,
62
- mutation: (oldSchema.getMutationType() || {}).name,
63
- subscription: (oldSchema.getSubscriptionType() || {}).name,
61
+ query: (oldSchema?.getQueryType() || {}).name,
62
+ mutation: (oldSchema?.getMutationType() || {}).name,
63
+ subscription: (oldSchema?.getSubscriptionType() || {}).name,
64
64
  };
65
65
  const newRoot = {
66
- query: (newSchema.getQueryType() || {}).name,
67
- mutation: (newSchema.getMutationType() || {}).name,
68
- subscription: (newSchema.getSubscriptionType() || {}).name,
66
+ query: (newSchema?.getQueryType() || {}).name,
67
+ mutation: (newSchema?.getMutationType() || {}).name,
68
+ subscription: (newSchema?.getSubscriptionType() || {}).name,
69
69
  };
70
70
  if (isNotEqual(oldRoot.query, newRoot.query)) {
71
71
  addChange(schemaQueryTypeChanged(oldSchema, newSchema));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-inspector/cli",
3
- "version": "6.0.3-alpha-20251115021448-4c9c66ec66402949bd6e335f5b1862519fc3bea6",
3
+ "version": "6.0.4-alpha-20251120234936-a610dbbf089ec9d85ff4ed1be60ed3ac2f019142",
4
4
  "description": "Tooling for GraphQL. Compare GraphQL Schemas, check documents, find breaking changes, find similar types.",
5
5
  "sideEffects": false,
6
6
  "peerDependencies": {
@@ -10,22 +10,22 @@
10
10
  "@babel/core": "7.26.10",
11
11
  "tslib": "2.6.2",
12
12
  "yargs": "17.7.2",
13
- "@graphql-inspector/audit-command": "5.0.15-alpha-20251115021448-4c9c66ec66402949bd6e335f5b1862519fc3bea6",
13
+ "@graphql-inspector/audit-command": "5.0.16-alpha-20251120234936-a610dbbf089ec9d85ff4ed1be60ed3ac2f019142",
14
14
  "@graphql-inspector/code-loader": "5.0.1",
15
15
  "@graphql-inspector/commands": "6.0.0",
16
+ "@graphql-inspector/coverage-command": "6.1.10-alpha-20251120234936-a610dbbf089ec9d85ff4ed1be60ed3ac2f019142",
16
17
  "@graphql-inspector/config": "4.0.2",
17
- "@graphql-inspector/coverage-command": "6.1.9-alpha-20251115021448-4c9c66ec66402949bd6e335f5b1862519fc3bea6",
18
- "@graphql-inspector/diff-command": "6.0.3-alpha-20251115021448-4c9c66ec66402949bd6e335f5b1862519fc3bea6",
18
+ "@graphql-inspector/diff-command": "6.0.4-alpha-20251120234936-a610dbbf089ec9d85ff4ed1be60ed3ac2f019142",
19
19
  "@graphql-inspector/docs-command": "5.0.5",
20
20
  "@graphql-inspector/github-loader": "5.0.1",
21
21
  "@graphql-inspector/git-loader": "5.0.1",
22
- "@graphql-inspector/introspect-command": "5.0.15-alpha-20251115021448-4c9c66ec66402949bd6e335f5b1862519fc3bea6",
23
22
  "@graphql-inspector/graphql-loader": "5.0.1",
23
+ "@graphql-inspector/introspect-command": "5.0.16-alpha-20251120234936-a610dbbf089ec9d85ff4ed1be60ed3ac2f019142",
24
24
  "@graphql-inspector/json-loader": "5.0.1",
25
25
  "@graphql-inspector/loaders": "4.1.0",
26
26
  "@graphql-inspector/serve-command": "5.0.7",
27
- "@graphql-inspector/similar-command": "5.0.15-alpha-20251115021448-4c9c66ec66402949bd6e335f5b1862519fc3bea6",
28
- "@graphql-inspector/validate-command": "5.0.15-alpha-20251115021448-4c9c66ec66402949bd6e335f5b1862519fc3bea6",
27
+ "@graphql-inspector/validate-command": "5.0.16-alpha-20251120234936-a610dbbf089ec9d85ff4ed1be60ed3ac2f019142",
28
+ "@graphql-inspector/similar-command": "5.0.16-alpha-20251120234936-a610dbbf089ec9d85ff4ed1be60ed3ac2f019142",
29
29
  "@graphql-inspector/url-loader": "5.0.1"
30
30
  },
31
31
  "repository": {
@@ -32,7 +32,7 @@ type KindToPayload = {
32
32
  change: DirectiveUsageEnumValueAddedChange | DirectiveUsageEnumValueRemovedChange;
33
33
  };
34
34
  [Kind.SCHEMA_DEFINITION]: {
35
- input: GraphQLSchema;
35
+ input: GraphQLSchema | null;
36
36
  change: DirectiveUsageSchemaAddedChange | DirectiveUsageSchemaRemovedChange;
37
37
  };
38
38
  [Kind.SCALAR_TYPE_DEFINITION]: {
@@ -32,7 +32,7 @@ type KindToPayload = {
32
32
  change: DirectiveUsageEnumValueAddedChange | DirectiveUsageEnumValueRemovedChange;
33
33
  };
34
34
  [Kind.SCHEMA_DEFINITION]: {
35
- input: GraphQLSchema;
35
+ input: GraphQLSchema | null;
36
36
  change: DirectiveUsageSchemaAddedChange | DirectiveUsageSchemaRemovedChange;
37
37
  };
38
38
  [Kind.SCALAR_TYPE_DEFINITION]: {
@@ -11,7 +11,7 @@ export declare function schemaQueryTypeChangedFromMeta(args: SchemaQueryTypeChan
11
11
  newQueryTypeName: string;
12
12
  };
13
13
  };
14
- export declare function schemaQueryTypeChanged(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Change<typeof ChangeType.SchemaQueryTypeChanged>;
14
+ export declare function schemaQueryTypeChanged(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null): Change<typeof ChangeType.SchemaQueryTypeChanged>;
15
15
  export declare function schemaMutationTypeChangedFromMeta(args: SchemaMutationTypeChangedChange): {
16
16
  readonly type: "SCHEMA_MUTATION_TYPE_CHANGED";
17
17
  readonly criticality: {
@@ -23,7 +23,7 @@ export declare function schemaMutationTypeChangedFromMeta(args: SchemaMutationTy
23
23
  newMutationTypeName: string;
24
24
  };
25
25
  };
26
- export declare function schemaMutationTypeChanged(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Change<typeof ChangeType.SchemaMutationTypeChanged>;
26
+ export declare function schemaMutationTypeChanged(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null): Change<typeof ChangeType.SchemaMutationTypeChanged>;
27
27
  export declare function schemaSubscriptionTypeChangedFromMeta(args: SchemaSubscriptionTypeChangedChange): {
28
28
  readonly type: "SCHEMA_SUBSCRIPTION_TYPE_CHANGED";
29
29
  readonly criticality: {
@@ -35,4 +35,4 @@ export declare function schemaSubscriptionTypeChangedFromMeta(args: SchemaSubscr
35
35
  newSubscriptionTypeName: string;
36
36
  };
37
37
  };
38
- export declare function schemaSubscriptionTypeChanged(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Change<typeof ChangeType.SchemaSubscriptionTypeChanged>;
38
+ export declare function schemaSubscriptionTypeChanged(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null): Change<typeof ChangeType.SchemaSubscriptionTypeChanged>;
@@ -11,7 +11,7 @@ export declare function schemaQueryTypeChangedFromMeta(args: SchemaQueryTypeChan
11
11
  newQueryTypeName: string;
12
12
  };
13
13
  };
14
- export declare function schemaQueryTypeChanged(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Change<typeof ChangeType.SchemaQueryTypeChanged>;
14
+ export declare function schemaQueryTypeChanged(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null): Change<typeof ChangeType.SchemaQueryTypeChanged>;
15
15
  export declare function schemaMutationTypeChangedFromMeta(args: SchemaMutationTypeChangedChange): {
16
16
  readonly type: "SCHEMA_MUTATION_TYPE_CHANGED";
17
17
  readonly criticality: {
@@ -23,7 +23,7 @@ export declare function schemaMutationTypeChangedFromMeta(args: SchemaMutationTy
23
23
  newMutationTypeName: string;
24
24
  };
25
25
  };
26
- export declare function schemaMutationTypeChanged(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Change<typeof ChangeType.SchemaMutationTypeChanged>;
26
+ export declare function schemaMutationTypeChanged(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null): Change<typeof ChangeType.SchemaMutationTypeChanged>;
27
27
  export declare function schemaSubscriptionTypeChangedFromMeta(args: SchemaSubscriptionTypeChangedChange): {
28
28
  readonly type: "SCHEMA_SUBSCRIPTION_TYPE_CHANGED";
29
29
  readonly criticality: {
@@ -35,4 +35,4 @@ export declare function schemaSubscriptionTypeChangedFromMeta(args: SchemaSubscr
35
35
  newSubscriptionTypeName: string;
36
36
  };
37
37
  };
38
- export declare function schemaSubscriptionTypeChanged(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Change<typeof ChangeType.SchemaSubscriptionTypeChanged>;
38
+ export declare function schemaSubscriptionTypeChanged(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null): Change<typeof ChangeType.SchemaSubscriptionTypeChanged>;
@@ -6,4 +6,4 @@ export * from './rules/types.cjs';
6
6
  export declare const DiffRule: typeof rules;
7
7
  export * from './onComplete/types.cjs';
8
8
  export type { UsageHandler } from './rules/consider-usage.cjs';
9
- export declare function diff(oldSchema: GraphQLSchema, newSchema: GraphQLSchema, rules?: Rule[], config?: rules.ConsiderUsageConfig): Promise<Change[]>;
9
+ export declare function diff(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null, rules?: Rule[], config?: rules.ConsiderUsageConfig): Promise<Change[]>;
@@ -6,4 +6,4 @@ export * from './rules/types.js';
6
6
  export declare const DiffRule: typeof rules;
7
7
  export * from './onComplete/types.js';
8
8
  export type { UsageHandler } from './rules/consider-usage.js';
9
- export declare function diff(oldSchema: GraphQLSchema, newSchema: GraphQLSchema, rules?: Rule[], config?: rules.ConsiderUsageConfig): Promise<Change[]>;
9
+ export declare function diff(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null, rules?: Rule[], config?: rules.ConsiderUsageConfig): Promise<Change[]>;
@@ -2,7 +2,7 @@ import { GraphQLSchema } from 'graphql';
2
2
  import { Change } from '../changes/change.cjs';
3
3
  export type Rule<TConfig = any> = (input: {
4
4
  changes: Change[];
5
- oldSchema: GraphQLSchema;
6
- newSchema: GraphQLSchema;
5
+ oldSchema: GraphQLSchema | null;
6
+ newSchema: GraphQLSchema | null;
7
7
  config: TConfig;
8
8
  }) => Change[] | Promise<Change[]>;
@@ -2,7 +2,7 @@ import { GraphQLSchema } from 'graphql';
2
2
  import { Change } from '../changes/change.js';
3
3
  export type Rule<TConfig = any> = (input: {
4
4
  changes: Change[];
5
- oldSchema: GraphQLSchema;
6
- newSchema: GraphQLSchema;
5
+ oldSchema: GraphQLSchema | null;
6
+ newSchema: GraphQLSchema | null;
7
7
  config: TConfig;
8
8
  }) => Change[] | Promise<Change[]>;
@@ -1,4 +1,4 @@
1
1
  import { GraphQLSchema } from 'graphql';
2
2
  import { Change } from './changes/change.cjs';
3
3
  export type AddChange = (change: Change) => void;
4
- export declare function diffSchema(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Change[];
4
+ export declare function diffSchema(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null): Change[];
@@ -1,4 +1,4 @@
1
1
  import { GraphQLSchema } from 'graphql';
2
2
  import { Change } from './changes/change.js';
3
3
  export type AddChange = (change: Change) => void;
4
- export declare function diffSchema(oldSchema: GraphQLSchema, newSchema: GraphQLSchema): Change[];
4
+ export declare function diffSchema(oldSchema: GraphQLSchema | null, newSchema: GraphQLSchema | null): Change[];