1
- import {
2
- getNamedType ,
3
- GraphQLScalarType ,
4
- GraphQLEnumType ,
5
- GraphQLInputObjectType ,
6
- GraphQLInterfaceType ,
7
- GraphQLObjectType ,
8
- GraphQLUnionType ,
9
- GraphQLNamedType ,
10
- } from '../type/definition' ;
11
1
import { GraphQLDirective } from '../type/directives' ;
12
2
import { GraphQLSchema } from '../type/schema' ;
13
3
import { DirectiveLocationEnum } from '../language/directiveLocation' ;
@@ -16,33 +6,33 @@ export const BreakingChangeType: _BreakingChangeType;
16
6
17
7
// @internal
18
8
type _BreakingChangeType = {
19
- FIELD_CHANGED_KIND : 'FIELD_CHANGED_KIND' ;
20
- FIELD_REMOVED : 'FIELD_REMOVED' ;
21
- TYPE_CHANGED_KIND : 'TYPE_CHANGED_KIND' ;
22
9
TYPE_REMOVED : 'TYPE_REMOVED' ;
10
+ TYPE_CHANGED_KIND : 'TYPE_CHANGED_KIND' ;
23
11
TYPE_REMOVED_FROM_UNION : 'TYPE_REMOVED_FROM_UNION' ;
24
12
VALUE_REMOVED_FROM_ENUM : 'VALUE_REMOVED_FROM_ENUM' ;
25
- ARG_REMOVED : 'ARG_REMOVED' ;
26
- ARG_CHANGED_KIND : 'ARG_CHANGED_KIND' ;
27
- REQUIRED_ARG_ADDED : 'REQUIRED_ARG_ADDED' ;
28
13
REQUIRED_INPUT_FIELD_ADDED : 'REQUIRED_INPUT_FIELD_ADDED' ;
29
14
INTERFACE_REMOVED_FROM_OBJECT : 'INTERFACE_REMOVED_FROM_OBJECT' ;
15
+ FIELD_REMOVED : 'FIELD_REMOVED' ;
16
+ FIELD_CHANGED_KIND : 'FIELD_CHANGED_KIND' ;
17
+ REQUIRED_ARG_ADDED : 'REQUIRED_ARG_ADDED' ;
18
+ ARG_REMOVED : 'ARG_REMOVED' ;
19
+ ARG_CHANGED_KIND : 'ARG_CHANGED_KIND' ;
30
20
DIRECTIVE_REMOVED : 'DIRECTIVE_REMOVED' ;
31
21
DIRECTIVE_ARG_REMOVED : 'DIRECTIVE_ARG_REMOVED' ;
32
- DIRECTIVE_LOCATION_REMOVED : 'DIRECTIVE_LOCATION_REMOVED' ;
33
22
REQUIRED_DIRECTIVE_ARG_ADDED : 'REQUIRED_DIRECTIVE_ARG_ADDED' ;
23
+ DIRECTIVE_LOCATION_REMOVED : 'DIRECTIVE_LOCATION_REMOVED' ;
34
24
} ;
35
25
36
26
export const DangerousChangeType : _DangerousChangeType ;
37
27
38
28
// @internal
39
29
type _DangerousChangeType = {
40
- ARG_DEFAULT_VALUE_CHANGE : 'ARG_DEFAULT_VALUE_CHANGE' ;
41
30
VALUE_ADDED_TO_ENUM : 'VALUE_ADDED_TO_ENUM' ;
42
- INTERFACE_ADDED_TO_OBJECT : 'INTERFACE_ADDED_TO_OBJECT' ;
43
31
TYPE_ADDED_TO_UNION : 'TYPE_ADDED_TO_UNION' ;
44
32
OPTIONAL_INPUT_FIELD_ADDED : 'OPTIONAL_INPUT_FIELD_ADDED' ;
45
33
OPTIONAL_ARG_ADDED : 'OPTIONAL_ARG_ADDED' ;
34
+ INTERFACE_ADDED_TO_OBJECT : 'INTERFACE_ADDED_TO_OBJECT' ;
35
+ ARG_DEFAULT_VALUE_CHANGE : 'ARG_DEFAULT_VALUE_CHANGE' ;
46
36
} ;
47
37
48
38
export interface BreakingChange {
@@ -72,119 +62,3 @@ export function findDangerousChanges(
72
62
oldSchema : GraphQLSchema ,
73
63
newSchema : GraphQLSchema ,
74
64
) : Array < DangerousChange > ;
75
-
76
- /**
77
- * Given two schemas, returns an Array containing descriptions of any breaking
78
- * changes in the newSchema related to removing an entire type.
79
- */
80
- export function findRemovedTypes (
81
- oldSchema : GraphQLSchema ,
82
- newSchema : GraphQLSchema ,
83
- ) : Array < BreakingChange > ;
84
-
85
- /**
86
- * Given two schemas, returns an Array containing descriptions of any breaking
87
- * changes in the newSchema related to changing the type of a type.
88
- */
89
- export function findTypesThatChangedKind (
90
- oldSchema : GraphQLSchema ,
91
- newSchema : GraphQLSchema ,
92
- ) : Array < BreakingChange > ;
93
-
94
- /**
95
- * Given two schemas, returns an Array containing descriptions of any
96
- * breaking or dangerous changes in the newSchema related to arguments
97
- * (such as removal or change of type of an argument, or a change in an
98
- * argument's default value).
99
- */
100
- export function findArgChanges (
101
- oldSchema : GraphQLSchema ,
102
- newSchema : GraphQLSchema ,
103
- ) : {
104
- breakingChanges : Array < BreakingChange > ;
105
- dangerousChanges : Array < DangerousChange > ;
106
- } ;
107
-
108
- export function findFieldsThatChangedTypeOnObjectOrInterfaceTypes (
109
- oldSchema : GraphQLSchema ,
110
- newSchema : GraphQLSchema ,
111
- ) : Array < BreakingChange > ;
112
-
113
- export function findFieldsThatChangedTypeOnInputObjectTypes (
114
- oldSchema : GraphQLSchema ,
115
- newSchema : GraphQLSchema ,
116
- ) : {
117
- breakingChanges : Array < BreakingChange > ;
118
- dangerousChanges : Array < DangerousChange > ;
119
- } ;
120
-
121
- /**
122
- * Given two schemas, returns an Array containing descriptions of any breaking
123
- * changes in the newSchema related to removing types from a union type.
124
- */
125
- export function findTypesRemovedFromUnions (
126
- oldSchema : GraphQLSchema ,
127
- newSchema : GraphQLSchema ,
128
- ) : Array < BreakingChange > ;
129
-
130
- /**
131
- * Given two schemas, returns an Array containing descriptions of any dangerous
132
- * changes in the newSchema related to adding types to a union type.
133
- */
134
- export function findTypesAddedToUnions (
135
- oldSchema : GraphQLSchema ,
136
- newSchema : GraphQLSchema ,
137
- ) : Array < DangerousChange > ;
138
-
139
- /**
140
- * Given two schemas, returns an Array containing descriptions of any breaking
141
- * changes in the newSchema related to removing values from an enum type.
142
- */
143
- export function findValuesRemovedFromEnums (
144
- oldSchema : GraphQLSchema ,
145
- newSchema : GraphQLSchema ,
146
- ) : Array < BreakingChange > ;
147
-
148
- /**
149
- * Given two schemas, returns an Array containing descriptions of any dangerous
150
- * changes in the newSchema related to adding values to an enum type.
151
- */
152
- export function findValuesAddedToEnums (
153
- oldSchema : GraphQLSchema ,
154
- newSchema : GraphQLSchema ,
155
- ) : Array < DangerousChange > ;
156
-
157
- export function findInterfacesRemovedFromObjectTypes (
158
- oldSchema : GraphQLSchema ,
159
- newSchema : GraphQLSchema ,
160
- ) : Array < BreakingChange > ;
161
-
162
- export function findInterfacesAddedToObjectTypes (
163
- oldSchema : GraphQLSchema ,
164
- newSchema : GraphQLSchema ,
165
- ) : Array < DangerousChange > ;
166
-
167
- export function findRemovedDirectives (
168
- oldSchema : GraphQLSchema ,
169
- newSchema : GraphQLSchema ,
170
- ) : Array < BreakingChange > ;
171
-
172
- export function findRemovedDirectiveArgs (
173
- oldSchema : GraphQLSchema ,
174
- newSchema : GraphQLSchema ,
175
- ) : Array < BreakingChange > ;
176
-
177
- export function findAddedNonNullDirectiveArgs (
178
- oldSchema : GraphQLSchema ,
179
- newSchema : GraphQLSchema ,
180
- ) : Array < BreakingChange > ;
181
-
182
- export function findRemovedLocationsForDirective (
183
- oldDirective : GraphQLDirective ,
184
- newDirective : GraphQLDirective ,
185
- ) : Array < DirectiveLocationEnum > ;
186
-
187
- export function findRemovedDirectiveLocations (
188
- oldSchema : GraphQLSchema ,
189
- newSchema : GraphQLSchema ,
190
- ) : Array < BreakingChange > ;
0 commit comments