-
-
Notifications
You must be signed in to change notification settings - Fork 191
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
Implement visual diff #1746
Implement visual diff #1746
Conversation
@@ -33,6 +33,9 @@ | |||
"@graphql-inspector/core": "0.0.0-PLACEHOLDER", | |||
"@graphql-inspector/commands": "0.0.0-PLACEHOLDER", | |||
"@graphql-inspector/logger": "0.0.0-PLACEHOLDER", | |||
"express": "4.17.1", | |||
"express-graphql": "0.11.0", | |||
"graphql-tools": "6.2.4-alpha-34c1194a.0", |
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.
@kamilkisiela This line could be removed when this bug is fixed.
@ardatan cc.
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.
@FluorescentHallucinogen looks good but let's wait for the fix @ardatan
@@ -0,0 +1,128 @@ | |||
<!DOCTYPE html> |
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.
@kamilkisiela Need your help. How to include (copy) this file into build?
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.
We would have to adjust bob-the-bundler
but I'll do it after merging this PR.
@kamilkisiela @dotansimha @ardatan @Urigo Also visual diff from this pull request could be a very useful addition to GraphQL Hive: All that is needed is to execute the next GraphQL query to https://app.graphql-hive.com/api/proxy endpoint query compare($organization: ID!, $project: ID!, $target: ID!, $version: ID!) {
schemaCompareToPrevious(
selector: {organization: $organization, project: $project, target: $target, version: $version}
) {
__typename
...SchemaCompareResultFields
...SchemaCompareErrorFields
}
schemaVersion(
selector: {organization: $organization, project: $project, target: $target, version: $version}
) {
__typename
...SchemaVersionFields
}
}
fragment SchemaCompareResultFields on SchemaCompareResult {
initial
changes {
total
nodes {
...SchemaChangeFields
__typename
}
__typename
}
diff {
before
after
__typename
}
}
fragment SchemaChangeFields on SchemaChange {
path
message
criticality
}
fragment SchemaCompareErrorFields on SchemaCompareError {
message
}
fragment SchemaVersionFields on SchemaVersion {
id
date
valid
commit {
id
author
service
commit
__typename
}
} and compare |
Hi @FluorescentHallucinogen , I do think this PR is a good reference for users who wants to create a custom setup on top of Voyager and Inspector, so maybe we can convert that into an example? |
This pull request adds a visual diff between two GraphQL schemas.
It should significantly improve the developer experience (DX) as compared to plaintext JSON diff.
Added fields are marked in green color, deleted in red and modified in yellow. Every change is explained in tooltip on affected field hover.