Skip to content

Commit 416a9ce

Browse files
egoodwinxEmily Goodwin
and
Emily Goodwin
authored
add more information on union fields being removed (#2838)
* add more information on union fields being removed * update wording * updated wording * add minor bump and changeset --------- Co-authored-by: Emily Goodwin <[email protected]>
1 parent 11aa74c commit 416a9ce

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.changeset/lazy-lemons-vanish.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@graphql-inspector/core': minor
3+
---
4+
5+
Updated removing field message to contain more information on why its a breaking change such as if
6+
the field is a union or indirectly referenced.

packages/core/src/diff/changes/field.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export function fieldRemovedFromMeta(args: FieldRemovedChange) {
3939
level: CriticalityLevel.Breaking,
4040
reason: args.meta.isRemovedFieldDeprecated
4141
? `Removing a deprecated field is a breaking change. Before removing it, you may want to look at the field's usage to see the impact of removing the field.`
42-
: `Removing a field is a breaking change. It is preferable to deprecate the field before removing it.`,
42+
: `Removing a field is a breaking change. It is preferable to deprecate the field before removing it. This applies to removed union fields as well, since removal breaks client operations that contain fragments that reference the removed type through direct (... on RemovedType) or indirect means such as __typename in the consumers.`,
4343
},
4444
message: buildFieldRemovedMessage(args.meta),
4545
meta: args.meta,

0 commit comments

Comments
 (0)