@graphql-inspector/core 7.0.3 → 7.0.4-alpha-20251126052709-1e9f99e5828f6aaf67924ae5761419279d6539e1
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.
- package/cjs/diff/changes/argument.js +3 -1
- package/cjs/diff/changes/directive.js +6 -2
- package/cjs/diff/changes/field.js +11 -4
- package/cjs/diff/changes/input.js +7 -3
- package/cjs/diff/changes/type.js +8 -3
- package/esm/diff/changes/argument.js +4 -2
- package/esm/diff/changes/directive.js +7 -3
- package/esm/diff/changes/field.js +11 -4
- package/esm/diff/changes/input.js +8 -4
- package/esm/diff/changes/type.js +8 -3
- package/package.json +1 -1
|
@@ -10,7 +10,9 @@ const graphql_js_1 = require("../../utils/graphql.js");
|
|
|
10
10
|
const string_js_1 = require("../../utils/string.js");
|
|
11
11
|
const change_js_1 = require("./change.js");
|
|
12
12
|
function buildFieldArgumentDescriptionChangedMessage(args) {
|
|
13
|
-
|
|
13
|
+
const oldDesc = (0, string_js_1.fmt)(args.oldDescription ?? 'undefined');
|
|
14
|
+
const newDesc = (0, string_js_1.fmt)(args.newDescription ?? 'undefined');
|
|
15
|
+
return `Description for argument '${args.argumentName}' on field '${args.typeName}.${args.fieldName}' changed from '${oldDesc}' to '${newDesc}'`;
|
|
14
16
|
}
|
|
15
17
|
function fieldArgumentDescriptionChangedFromMeta(args) {
|
|
16
18
|
return {
|
|
@@ -78,7 +78,9 @@ function directiveAdded(directive) {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
function buildDirectiveDescriptionChangedMessage(args) {
|
|
81
|
-
|
|
81
|
+
const oldDesc = (0, string_js_1.fmt)(args.oldDirectiveDescription ?? 'undefined');
|
|
82
|
+
const newDesc = (0, string_js_1.fmt)(args.newDirectiveDescription ?? 'undefined');
|
|
83
|
+
return `Directive '${args.directiveName}' description changed from '${oldDesc}' to '${newDesc}'`;
|
|
82
84
|
}
|
|
83
85
|
function directiveDescriptionChangedFromMeta(args) {
|
|
84
86
|
return {
|
|
@@ -258,7 +260,9 @@ function directiveArgumentRemoved(directive, arg) {
|
|
|
258
260
|
});
|
|
259
261
|
}
|
|
260
262
|
function buildDirectiveArgumentDescriptionChangedMessage(args) {
|
|
261
|
-
|
|
263
|
+
const oldDesc = (0, string_js_1.fmt)(args.oldDirectiveArgumentDescription ?? 'undefined');
|
|
264
|
+
const newDesc = (0, string_js_1.fmt)(args.newDirectiveArgumentDescription ?? 'undefined');
|
|
265
|
+
return `Description for argument '${args.directiveArgumentName}' on directive '${args.directiveName}' changed from '${oldDesc}' to '${newDesc}'`;
|
|
262
266
|
}
|
|
263
267
|
function directiveArgumentDescriptionChangedFromMeta(args) {
|
|
264
268
|
return {
|
|
@@ -28,6 +28,7 @@ exports.fieldArgumentRemovedFromMeta = fieldArgumentRemovedFromMeta;
|
|
|
28
28
|
exports.fieldArgumentRemoved = fieldArgumentRemoved;
|
|
29
29
|
const graphql_1 = require("graphql");
|
|
30
30
|
const graphql_js_1 = require("../../utils/graphql.js");
|
|
31
|
+
const string_js_1 = require("../../utils/string.js");
|
|
31
32
|
const change_js_1 = require("./change.js");
|
|
32
33
|
function buildFieldRemovedMessage(args) {
|
|
33
34
|
return `Field '${args.removedFieldName}' ${args.isRemovedFieldDeprecated ? '(deprecated) ' : ''}was removed from ${args.typeType} '${args.typeName}'`;
|
|
@@ -85,7 +86,9 @@ function fieldAdded(type, field) {
|
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
function buildFieldDescriptionChangedMessage(args) {
|
|
88
|
-
|
|
89
|
+
const oldDesc = (0, string_js_1.fmt)(args.oldDescription || 'undefined');
|
|
90
|
+
const newDesc = (0, string_js_1.fmt)(args.newDescription || 'undefined');
|
|
91
|
+
return `Field '${args.typeName}.${args.fieldName}' description changed from '${oldDesc}' to '${newDesc}'`;
|
|
89
92
|
}
|
|
90
93
|
function fieldDescriptionChangedFromMeta(args) {
|
|
91
94
|
return {
|
|
@@ -110,7 +113,8 @@ function fieldDescriptionChanged(type, oldField, newField) {
|
|
|
110
113
|
});
|
|
111
114
|
}
|
|
112
115
|
function buildFieldDescriptionAddedMessage(args) {
|
|
113
|
-
|
|
116
|
+
const desc = (0, string_js_1.fmt)(args.addedDescription);
|
|
117
|
+
return `Field '${args.typeName}.${args.fieldName}' has description '${desc}'`;
|
|
114
118
|
}
|
|
115
119
|
function fieldDescriptionAddedFromMeta(args) {
|
|
116
120
|
return {
|
|
@@ -201,7 +205,9 @@ function fieldDeprecationRemoved(type, field) {
|
|
|
201
205
|
});
|
|
202
206
|
}
|
|
203
207
|
function buildFieldDeprecationReasonChangedMessage(args) {
|
|
204
|
-
|
|
208
|
+
const oldReason = (0, string_js_1.fmt)(args.oldDeprecationReason);
|
|
209
|
+
const newReason = (0, string_js_1.fmt)(args.newDeprecationReason);
|
|
210
|
+
return `Deprecation reason on field '${args.typeName}.${args.fieldName}' has changed from '${oldReason}' to '${newReason}'`;
|
|
205
211
|
}
|
|
206
212
|
function fieldDeprecationReasonChangedFromMeta(args) {
|
|
207
213
|
return {
|
|
@@ -226,7 +232,8 @@ function fieldDeprecationReasonChanged(type, oldField, newField) {
|
|
|
226
232
|
});
|
|
227
233
|
}
|
|
228
234
|
function buildFieldDeprecationReasonAddedMessage(args) {
|
|
229
|
-
|
|
235
|
+
const reason = (0, string_js_1.fmt)(args.addedDeprecationReason);
|
|
236
|
+
return `Field '${args.typeName}.${args.fieldName}' has deprecation reason '${reason}'`;
|
|
230
237
|
}
|
|
231
238
|
function fieldDeprecationReasonAddedFromMeta(args) {
|
|
232
239
|
return {
|
|
@@ -82,7 +82,8 @@ function inputFieldAdded(input, field, addedToNewType) {
|
|
|
82
82
|
});
|
|
83
83
|
}
|
|
84
84
|
function buildInputFieldDescriptionAddedMessage(args) {
|
|
85
|
-
|
|
85
|
+
const desc = (0, string_js_1.fmt)(args.addedInputFieldDescription);
|
|
86
|
+
return `Input field '${args.inputName}.${args.inputFieldName}' has description '${desc}'`;
|
|
86
87
|
}
|
|
87
88
|
function inputFieldDescriptionAddedFromMeta(args) {
|
|
88
89
|
return {
|
|
@@ -106,7 +107,8 @@ function inputFieldDescriptionAdded(type, field) {
|
|
|
106
107
|
});
|
|
107
108
|
}
|
|
108
109
|
function buildInputFieldDescriptionRemovedMessage(args) {
|
|
109
|
-
|
|
110
|
+
const desc = (0, string_js_1.fmt)(args.removedDescription);
|
|
111
|
+
return `Description '${desc}' was removed from input field '${args.inputName}.${args.inputFieldName}'`;
|
|
110
112
|
}
|
|
111
113
|
function inputFieldDescriptionRemovedFromMeta(args) {
|
|
112
114
|
return {
|
|
@@ -130,7 +132,9 @@ function inputFieldDescriptionRemoved(type, field) {
|
|
|
130
132
|
});
|
|
131
133
|
}
|
|
132
134
|
function buildInputFieldDescriptionChangedMessage(args) {
|
|
133
|
-
|
|
135
|
+
const oldDesc = (0, string_js_1.fmt)(args.oldInputFieldDescription);
|
|
136
|
+
const newDesc = (0, string_js_1.fmt)(args.newInputFieldDescription);
|
|
137
|
+
return `Input field '${args.inputName}.${args.inputFieldName}' description changed from '${oldDesc}' to '${newDesc}'`;
|
|
134
138
|
}
|
|
135
139
|
function inputFieldDescriptionChangedFromMeta(args) {
|
|
136
140
|
return {
|
package/cjs/diff/changes/type.js
CHANGED
|
@@ -14,6 +14,7 @@ exports.typeDescriptionAddedFromMeta = typeDescriptionAddedFromMeta;
|
|
|
14
14
|
exports.typeDescriptionAdded = typeDescriptionAdded;
|
|
15
15
|
const graphql_1 = require("graphql");
|
|
16
16
|
const graphql_js_1 = require("../../utils/graphql.js");
|
|
17
|
+
const string_js_1 = require("../../utils/string.js");
|
|
17
18
|
const change_js_1 = require("./change.js");
|
|
18
19
|
function buildTypeRemovedMessage(type) {
|
|
19
20
|
return `Type '${type.removedTypeName}' was removed`;
|
|
@@ -114,7 +115,9 @@ function typeKindChanged(oldType, newType) {
|
|
|
114
115
|
});
|
|
115
116
|
}
|
|
116
117
|
function buildTypeDescriptionChangedMessage(args) {
|
|
117
|
-
|
|
118
|
+
const oldDesc = (0, string_js_1.fmt)(args.oldTypeDescription);
|
|
119
|
+
const newDesc = (0, string_js_1.fmt)(args.newTypeDescription);
|
|
120
|
+
return `Description '${oldDesc}' on type '${args.typeName}' has changed to '${newDesc}'`;
|
|
118
121
|
}
|
|
119
122
|
function typeDescriptionChangedFromMeta(args) {
|
|
120
123
|
return {
|
|
@@ -138,7 +141,8 @@ function typeDescriptionChanged(oldType, newType) {
|
|
|
138
141
|
});
|
|
139
142
|
}
|
|
140
143
|
function buildTypeDescriptionRemoved(args) {
|
|
141
|
-
|
|
144
|
+
const desc = (0, string_js_1.fmt)(args.removedTypeDescription);
|
|
145
|
+
return `Description '${desc}' was removed from object type '${args.typeName}'`;
|
|
142
146
|
}
|
|
143
147
|
function typeDescriptionRemovedFromMeta(args) {
|
|
144
148
|
return {
|
|
@@ -161,7 +165,8 @@ function typeDescriptionRemoved(type) {
|
|
|
161
165
|
});
|
|
162
166
|
}
|
|
163
167
|
function buildTypeDescriptionAddedMessage(args) {
|
|
164
|
-
|
|
168
|
+
const desc = (0, string_js_1.fmt)(args.addedTypeDescription);
|
|
169
|
+
return `Object type '${args.typeName}' has description '${desc}'`;
|
|
165
170
|
}
|
|
166
171
|
function typeDescriptionAddedFromMeta(args) {
|
|
167
172
|
return {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { safeChangeForInputValue } from '../../utils/graphql.js';
|
|
2
|
-
import { safeString } from '../../utils/string.js';
|
|
2
|
+
import { fmt, safeString } from '../../utils/string.js';
|
|
3
3
|
import { ChangeType, CriticalityLevel, } from './change.js';
|
|
4
4
|
function buildFieldArgumentDescriptionChangedMessage(args) {
|
|
5
|
-
|
|
5
|
+
const oldDesc = fmt(args.oldDescription ?? 'undefined');
|
|
6
|
+
const newDesc = fmt(args.newDescription ?? 'undefined');
|
|
7
|
+
return `Description for argument '${args.argumentName}' on field '${args.typeName}.${args.fieldName}' changed from '${oldDesc}' to '${newDesc}'`;
|
|
6
8
|
}
|
|
7
9
|
export function fieldArgumentDescriptionChangedFromMeta(args) {
|
|
8
10
|
return {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isNonNullType } from 'graphql';
|
|
2
2
|
import { safeChangeForInputValue } from '../../utils/graphql.js';
|
|
3
|
-
import { safeString } from '../../utils/string.js';
|
|
3
|
+
import { fmt, safeString } from '../../utils/string.js';
|
|
4
4
|
import { ChangeType, CriticalityLevel, } from './change.js';
|
|
5
5
|
function buildDirectiveRemovedMessage(args) {
|
|
6
6
|
return `Directive '${args.removedDirectiveName}' was removed`;
|
|
@@ -52,7 +52,9 @@ export function directiveAdded(directive) {
|
|
|
52
52
|
});
|
|
53
53
|
}
|
|
54
54
|
function buildDirectiveDescriptionChangedMessage(args) {
|
|
55
|
-
|
|
55
|
+
const oldDesc = fmt(args.oldDirectiveDescription ?? 'undefined');
|
|
56
|
+
const newDesc = fmt(args.newDirectiveDescription ?? 'undefined');
|
|
57
|
+
return `Directive '${args.directiveName}' description changed from '${oldDesc}' to '${newDesc}'`;
|
|
56
58
|
}
|
|
57
59
|
export function directiveDescriptionChangedFromMeta(args) {
|
|
58
60
|
return {
|
|
@@ -232,7 +234,9 @@ export function directiveArgumentRemoved(directive, arg) {
|
|
|
232
234
|
});
|
|
233
235
|
}
|
|
234
236
|
function buildDirectiveArgumentDescriptionChangedMessage(args) {
|
|
235
|
-
|
|
237
|
+
const oldDesc = fmt(args.oldDirectiveArgumentDescription ?? 'undefined');
|
|
238
|
+
const newDesc = fmt(args.newDirectiveArgumentDescription ?? 'undefined');
|
|
239
|
+
return `Description for argument '${args.directiveArgumentName}' on directive '${args.directiveName}' changed from '${oldDesc}' to '${newDesc}'`;
|
|
236
240
|
}
|
|
237
241
|
export function directiveArgumentDescriptionChangedFromMeta(args) {
|
|
238
242
|
return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GraphQLDeprecatedDirective, isInterfaceType, isNonNullType, } from 'graphql';
|
|
2
2
|
import { safeChangeForField } from '../../utils/graphql.js';
|
|
3
|
+
import { fmt } from '../../utils/string.js';
|
|
3
4
|
import { ChangeType, CriticalityLevel, } from './change.js';
|
|
4
5
|
function buildFieldRemovedMessage(args) {
|
|
5
6
|
return `Field '${args.removedFieldName}' ${args.isRemovedFieldDeprecated ? '(deprecated) ' : ''}was removed from ${args.typeType} '${args.typeName}'`;
|
|
@@ -57,7 +58,9 @@ export function fieldAdded(type, field) {
|
|
|
57
58
|
});
|
|
58
59
|
}
|
|
59
60
|
function buildFieldDescriptionChangedMessage(args) {
|
|
60
|
-
|
|
61
|
+
const oldDesc = fmt(args.oldDescription || 'undefined');
|
|
62
|
+
const newDesc = fmt(args.newDescription || 'undefined');
|
|
63
|
+
return `Field '${args.typeName}.${args.fieldName}' description changed from '${oldDesc}' to '${newDesc}'`;
|
|
61
64
|
}
|
|
62
65
|
export function fieldDescriptionChangedFromMeta(args) {
|
|
63
66
|
return {
|
|
@@ -82,7 +85,8 @@ export function fieldDescriptionChanged(type, oldField, newField) {
|
|
|
82
85
|
});
|
|
83
86
|
}
|
|
84
87
|
function buildFieldDescriptionAddedMessage(args) {
|
|
85
|
-
|
|
88
|
+
const desc = fmt(args.addedDescription);
|
|
89
|
+
return `Field '${args.typeName}.${args.fieldName}' has description '${desc}'`;
|
|
86
90
|
}
|
|
87
91
|
export function fieldDescriptionAddedFromMeta(args) {
|
|
88
92
|
return {
|
|
@@ -173,7 +177,9 @@ export function fieldDeprecationRemoved(type, field) {
|
|
|
173
177
|
});
|
|
174
178
|
}
|
|
175
179
|
function buildFieldDeprecationReasonChangedMessage(args) {
|
|
176
|
-
|
|
180
|
+
const oldReason = fmt(args.oldDeprecationReason);
|
|
181
|
+
const newReason = fmt(args.newDeprecationReason);
|
|
182
|
+
return `Deprecation reason on field '${args.typeName}.${args.fieldName}' has changed from '${oldReason}' to '${newReason}'`;
|
|
177
183
|
}
|
|
178
184
|
export function fieldDeprecationReasonChangedFromMeta(args) {
|
|
179
185
|
return {
|
|
@@ -198,7 +204,8 @@ export function fieldDeprecationReasonChanged(type, oldField, newField) {
|
|
|
198
204
|
});
|
|
199
205
|
}
|
|
200
206
|
function buildFieldDeprecationReasonAddedMessage(args) {
|
|
201
|
-
|
|
207
|
+
const reason = fmt(args.addedDeprecationReason);
|
|
208
|
+
return `Field '${args.typeName}.${args.fieldName}' has deprecation reason '${reason}'`;
|
|
202
209
|
}
|
|
203
210
|
export function fieldDeprecationReasonAddedFromMeta(args) {
|
|
204
211
|
return {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isNonNullType } from 'graphql';
|
|
2
2
|
import { safeChangeForInputValue } from '../../utils/graphql.js';
|
|
3
3
|
import { isDeprecated } from '../../utils/is-deprecated.js';
|
|
4
|
-
import { safeString } from '../../utils/string.js';
|
|
4
|
+
import { fmt, safeString } from '../../utils/string.js';
|
|
5
5
|
import { ChangeType, CriticalityLevel, } from './change.js';
|
|
6
6
|
function buildInputFieldRemovedMessage(args) {
|
|
7
7
|
return `Input field '${args.removedFieldName}' ${args.isInputFieldDeprecated ? '(deprecated) ' : ''}was removed from input object type '${args.inputName}'`;
|
|
@@ -65,7 +65,8 @@ export function inputFieldAdded(input, field, addedToNewType) {
|
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
function buildInputFieldDescriptionAddedMessage(args) {
|
|
68
|
-
|
|
68
|
+
const desc = fmt(args.addedInputFieldDescription);
|
|
69
|
+
return `Input field '${args.inputName}.${args.inputFieldName}' has description '${desc}'`;
|
|
69
70
|
}
|
|
70
71
|
export function inputFieldDescriptionAddedFromMeta(args) {
|
|
71
72
|
return {
|
|
@@ -89,7 +90,8 @@ export function inputFieldDescriptionAdded(type, field) {
|
|
|
89
90
|
});
|
|
90
91
|
}
|
|
91
92
|
function buildInputFieldDescriptionRemovedMessage(args) {
|
|
92
|
-
|
|
93
|
+
const desc = fmt(args.removedDescription);
|
|
94
|
+
return `Description '${desc}' was removed from input field '${args.inputName}.${args.inputFieldName}'`;
|
|
93
95
|
}
|
|
94
96
|
export function inputFieldDescriptionRemovedFromMeta(args) {
|
|
95
97
|
return {
|
|
@@ -113,7 +115,9 @@ export function inputFieldDescriptionRemoved(type, field) {
|
|
|
113
115
|
});
|
|
114
116
|
}
|
|
115
117
|
function buildInputFieldDescriptionChangedMessage(args) {
|
|
116
|
-
|
|
118
|
+
const oldDesc = fmt(args.oldInputFieldDescription);
|
|
119
|
+
const newDesc = fmt(args.newInputFieldDescription);
|
|
120
|
+
return `Input field '${args.inputName}.${args.inputFieldName}' description changed from '${oldDesc}' to '${newDesc}'`;
|
|
117
121
|
}
|
|
118
122
|
export function inputFieldDescriptionChangedFromMeta(args) {
|
|
119
123
|
return {
|
package/esm/diff/changes/type.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { isEnumType, isInputObjectType, isInterfaceType, isObjectType, isUnionType, Kind, } from 'graphql';
|
|
2
2
|
import { getKind } from '../../utils/graphql.js';
|
|
3
|
+
import { fmt } from '../../utils/string.js';
|
|
3
4
|
import { ChangeType, CriticalityLevel, } from './change.js';
|
|
4
5
|
function buildTypeRemovedMessage(type) {
|
|
5
6
|
return `Type '${type.removedTypeName}' was removed`;
|
|
@@ -100,7 +101,9 @@ export function typeKindChanged(oldType, newType) {
|
|
|
100
101
|
});
|
|
101
102
|
}
|
|
102
103
|
function buildTypeDescriptionChangedMessage(args) {
|
|
103
|
-
|
|
104
|
+
const oldDesc = fmt(args.oldTypeDescription);
|
|
105
|
+
const newDesc = fmt(args.newTypeDescription);
|
|
106
|
+
return `Description '${oldDesc}' on type '${args.typeName}' has changed to '${newDesc}'`;
|
|
104
107
|
}
|
|
105
108
|
export function typeDescriptionChangedFromMeta(args) {
|
|
106
109
|
return {
|
|
@@ -124,7 +127,8 @@ export function typeDescriptionChanged(oldType, newType) {
|
|
|
124
127
|
});
|
|
125
128
|
}
|
|
126
129
|
function buildTypeDescriptionRemoved(args) {
|
|
127
|
-
|
|
130
|
+
const desc = fmt(args.removedTypeDescription);
|
|
131
|
+
return `Description '${desc}' was removed from object type '${args.typeName}'`;
|
|
128
132
|
}
|
|
129
133
|
export function typeDescriptionRemovedFromMeta(args) {
|
|
130
134
|
return {
|
|
@@ -147,7 +151,8 @@ export function typeDescriptionRemoved(type) {
|
|
|
147
151
|
});
|
|
148
152
|
}
|
|
149
153
|
function buildTypeDescriptionAddedMessage(args) {
|
|
150
|
-
|
|
154
|
+
const desc = fmt(args.addedTypeDescription);
|
|
155
|
+
return `Object type '${args.typeName}' has description '${desc}'`;
|
|
151
156
|
}
|
|
152
157
|
export function typeDescriptionAddedFromMeta(args) {
|
|
153
158
|
return {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@graphql-inspector/core",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.4-alpha-20251126052709-1e9f99e5828f6aaf67924ae5761419279d6539e1",
|
|
4
4
|
"description": "Tooling for GraphQL. Compare GraphQL Schemas, check documents, find breaking changes, find similar types.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"peerDependencies": {
|