-
-
Notifications
You must be signed in to change notification settings - Fork 205
Generate changes for new or deleted schemas #2923
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
💻 Website PreviewThe latest changes are available as preview in: https://pr-2923.graphql-inspector.pages.dev |
🚀 Snapshot Release (
|
| Package | Version | Info |
|---|---|---|
@graphql-inspector/action |
5.0.16-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
@graphql-inspector/cli |
6.0.4-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
@graphql-inspector/audit-command |
5.0.16-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
@graphql-inspector/coverage-command |
6.1.10-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
@graphql-inspector/diff-command |
6.0.4-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
@graphql-inspector/introspect-command |
5.0.16-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
@graphql-inspector/similar-command |
5.0.16-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
@graphql-inspector/validate-command |
5.0.16-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
@graphql-inspector/core |
7.1.0-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
@graphql-inspector/patch |
0.1.0-alpha-20251210220709-671f8b3cdccca39e371f19a9a1cbf9a8ed76eac6 |
npm ↗︎ unpkg ↗︎ |
| Object.values(oldSchema.getTypeMap()).filter(t => !isPrimitive(t)), | ||
| Object.values(newSchema.getTypeMap()).filter(t => !isPrimitive(t)), | ||
| Object.values(oldSchema?.getTypeMap() ?? {}).filter( | ||
| t => !isPrimitive(t) && !isForIntrospection(t), |
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.
Need to exclude these introspection types. Otherwise they'll show as "added" if null is passed as the oldSchema.
Before, both oldSchema and newSchema contained identical types and so no changes were output.
…wn' when these types are not defined
n1ru4l
left a comment
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.
See https://github.com/graphql-hive/graphql-inspector/pull/2923/files#r2605625304
I am fine with doing a major release, it is just a number to me. 🤷
Some people might complain about doing this a minot, but I am also fine with taking that risk.
Description
Ref CONSOLE-1540
Showing a list of changes can be useful even for new or deleted schemas.
This change allows
nullto be passed todiffas either the old and/or new schema.Currently, on Hive, checking a new schema shows "no changes". This isn't harmful since additions are safe, but it's confusing. Showing a full list of additions in the new schema would make much more sense.
Type of change
How Has This Been Tested?
See unit tests
Checklist:
CONTRIBUTING doc and the
style guidelines of this project