Skip to content

Commit

Permalink
Fix Change type export
Browse files Browse the repository at this point in the history
  • Loading branch information
TuvalSimha committed Nov 11, 2024
1 parent c5d5633 commit d90200f
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .changeset/odd-moons-sip.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@graphql-inspector/core': minor
---

Added missing types to Change type and fix typo "DirectiveUsageInputObjectdRemovedChange" to
"DirectiveUsageInputObjectRemovedChange"
21 changes: 18 additions & 3 deletions packages/core/src/diff/changes/change.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ export type DirectiveUsageEnumValueRemovedChange = {
};
};

export type DirectiveUsageInputObjectdRemovedChange = {
export type DirectiveUsageInputObjectRemovedChange = {
type: typeof ChangeType.DirectiveUsageInputObjectRemoved;
meta: {
inputObjectName: string;
Expand Down Expand Up @@ -812,6 +812,18 @@ export type DirectiveUsageInterfaceRemovedChange = {
removedDirectiveName: string;
};
};

export type DirectiveUsageArgumentDefinitionAddedChange = {
type: typeof ChangeType.DirectiveUsageArgumentDefinitionAdded;
meta: {
typeName: string;
fieldName: string;
argumentName: string;
addedDirectiveName: string;
};
};


type Changes = {
[ChangeType.TypeAdded]: TypeAddedChange;
[ChangeType.TypeRemoved]: TypeRemovedChange;
Expand Down Expand Up @@ -892,7 +904,7 @@ type Changes = {
[ChangeType.DirectiveUsageEnumValueAdded]: DirectiveUsageEnumValueAddedChange;
[ChangeType.DirectiveUsageEnumValueRemoved]: DirectiveUsageEnumValueRemovedChange;
[ChangeType.DirectiveUsageInputObjectAdded]: DirectiveUsageInputObjectAddedChange;
[ChangeType.DirectiveUsageInputObjectRemoved]: DirectiveUsageInputObjectdRemovedChange;
[ChangeType.DirectiveUsageInputObjectRemoved]: DirectiveUsageInputObjectRemovedChange;
[ChangeType.DirectiveUsageFieldAdded]: DirectiveUsageFieldAddedChange;
[ChangeType.DirectiveUsageFieldRemoved]: DirectiveUsageFieldRemovedChange;
[ChangeType.DirectiveUsageScalarAdded]: DirectiveUsageScalarAddedChange;
Expand All @@ -901,12 +913,15 @@ type Changes = {
[ChangeType.DirectiveUsageObjectRemoved]: DirectiveUsageObjectRemovedChange;
[ChangeType.DirectiveUsageInterfaceAdded]: DirectiveUsageInterfaceAddedChange;
[ChangeType.DirectiveUsageInterfaceRemoved]: DirectiveUsageInterfaceRemovedChange;
[ChangeType.DirectiveUsageArgumentDefinitionAdded]: DirectiveUsageArgumentDefinitionChange;
[ChangeType.DirectiveUsageArgumentDefinitionAdded]: DirectiveUsageArgumentDefinitionAddedChange;
[ChangeType.DirectiveUsageArgumentDefinitionRemoved]: DirectiveUsageArgumentDefinitionRemovedChange;
[ChangeType.DirectiveUsageSchemaAdded]: DirectiveUsageSchemaAddedChange;
[ChangeType.DirectiveUsageSchemaRemoved]: DirectiveUsageSchemaRemovedChange;
[ChangeType.DirectiveUsageFieldDefinitionAdded]: DirectiveUsageFieldDefinitionAddedChange;
[ChangeType.DirectiveUsageFieldDefinitionRemoved]: DirectiveUsageFieldDefinitionRemovedChange;
[ChangeType.DirectiveUsageInputFieldDefinitionAdded]: DirectiveUsageInputFieldDefinitionAddedChange;
[ChangeType.DirectiveUsageInputFieldDefinitionRemoved]: DirectiveUsageInputFieldDefinitionRemovedChange;
};


export type SerializableChange = Changes[keyof Changes];
4 changes: 2 additions & 2 deletions packages/core/src/diff/changes/directive-usage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import {
DirectiveUsageFieldDefinitionAddedChange,
DirectiveUsageFieldDefinitionRemovedChange,
DirectiveUsageInputObjectAddedChange,
DirectiveUsageInputObjectdRemovedChange,
DirectiveUsageInputObjectRemovedChange,
DirectiveUsageInterfaceAddedChange,
DirectiveUsageInterfaceRemovedChange,
DirectiveUsageObjectAddedChange,
Expand Down Expand Up @@ -100,7 +100,7 @@ type KindToPayload = {
};
[Kind.INPUT_OBJECT_TYPE_DEFINITION]: {
input: GraphQLInputObjectType;
change: DirectiveUsageInputObjectAddedChange | DirectiveUsageInputObjectdRemovedChange;
change: DirectiveUsageInputObjectAddedChange | DirectiveUsageInputObjectRemovedChange;
};
[Kind.INPUT_VALUE_DEFINITION]: {
input: {
Expand Down

0 comments on commit d90200f

Please sign in to comment.