-
-
Notifications
You must be signed in to change notification settings - Fork 197
add more information on union fields being removed #2838
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add more information on union fields being removed #2838
Conversation
🦋 Changeset detectedLatest commit: 960183c The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@@ -39,7 +39,7 @@ export function fieldRemovedFromMeta(args: FieldRemovedChange) { | |||
level: CriticalityLevel.Breaking, | |||
reason: args.meta.isRemovedFieldDeprecated | |||
? `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.` | |||
: `Removing a field is a breaking change. It is preferable to deprecate the field before removing it.`, | |||
: `Removing a field is a breaking change. It is preferable to deprecate the field before removing it. This applies removed union fields as well as it affects the __typename field which can break your GraphQL consumers.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we may still get questions about why consumers break. Prefer clarifying at least one of the specific cases:
This applies to removed union fields as well, since removal breaks client operations that contain fragments that reference the removed type. E.g.
...on RemovedType
.
If there are other cases, then those can be mentioned too unless it gets to be too many.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure can update, do you know what other cases there might be?
I think the case mentioned has to do with the __typename field since that could contain reference to the field even though there aren't references of the type itself.
This looks good to me. |
Can you also add a changeset? |
🚨 IMPORTANT: Please do not create a Pull Request without creating an issue first.
These integration tests will need to be updated as well for hive:
https://github.com/graphql-hive/console/blob/10f91e2f956fb96bd5abfa250ab0197e9891f975/integration-tests/tests/api/schema/delete.spec.ts#L212
https://github.com/graphql-hive/console/blob/10f91e2f956fb96bd5abfa250ab0197e9891f975/packages/services/api/src/modules/alerts/providers/adapters/msteams.spec.ts#L55
Description
Updated removal field text to be:
Removing a field is a breaking change. It is preferable to deprecate the field before removing it. This applies removed union fields as well as it affects the __typename field which can break your GraphQL consumers.
Fixes # graphql-hive/console#6125
Type of change
Please delete options that are not relevant.
Screenshots/Sandbox (if appropriate/relevant):
Adding links to sandbox or providing screenshots can help us understand more about this PR and take
action on it as appropriate
How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can
reproduce. Please also list any relevant details for your test configuration
pnpm test
Test Environment:
@graphql-inspector/...
:Checklist:
CONTRIBUTING doc and the
style guidelines of this project
Further comments