-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hi 👋
For the schema comparison:
Old Schema:
type Query {}
New schema:
type Query {}
type App {
name(
foo: String
): String
}
The current behaviour only triggers one change:
Changes::TypeAdded
But for linting purposes, it's important to have the full set of changes:
Changes::TypeAdded
Changes::FieldAdded
Changes::FieldArgumentAdded
I'm proposing an option to return the nested schema changes for new types and fields.
This can be done by comparing the new types and fields to empty versions of them. Comparing the new type with an empty one returns Changes::FieldAdded
and comparing this field with an empty one returns Changes::FieldArgumentAdded
.
An approach like this does not require modifying the Change
classes. It can be done in Schema::Diff
or by having a similar class that does this "recursive" schema comparison.
Metadata
Metadata
Assignees
Labels
No labels