graphql-schema-diff
This crate implements diffing of two GraphQL schemas, returning a list of changes. It powers the changelog feature and operation checks at Grafbase.
Example
use ;
let source = r#"
type Pizza {
id: ID!
name: String!
toppings: [Topping!]!
}
enum Topping {
OLIVES
MUSHROOMS
PINEAPPLE
}
"#;
let target = r#"
type Pizza {
id: ID!
name: PizzaName
toppings: [Topping!]!
}
type PizzaName {
english: String
italian: String!
}
enum Topping {
OLIVES
MUSHROOMS
POTATO
}
"#;
let changes = diff.unwrap;
assert_eq!;
Cargo features
serde
:Serialize
andDeserialize
impls forChange
(default: on).