You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The composition of stitching projects is not predictable.
In stitching the composition result is affected by the order of the service SDLs passed to the stitching implementation.
Within Hive, we always load the service SDLs ordered by their creation date. By doing so the order of the services is unpredictable, as the service's position within the list can change based on when it was last published. If there are conflicting type definitions within multiple services this can lead to unexpected composed schemas.
Example:
# service AtypeNotification {
message: String
}
# service BtypeNotification {
message: String!
}
If B is behind A, in the composed schema Notification.message will be of type String!.
If A is behind B, in the composed schema Notification.message will be of type String.
Since we detect schema changes based on diffing composed schemas the service order change can lead to unexpected schema changes being reported, which are unrelated to the schema being published, but related to the changed order of the services that was triggered by a publish.
This confuses users of Hive and makes the predictability and usage of the composed schema (and services CDN endpoint) unsafe.
The text was updated successfully, but these errors were encountered:
The composition of stitching projects is not predictable.
In stitching the composition result is affected by the order of the service SDLs passed to the stitching implementation.
Within Hive, we always load the service SDLs ordered by their creation date. By doing so the order of the services is unpredictable, as the service's position within the list can change based on when it was last published. If there are conflicting type definitions within multiple services this can lead to unexpected composed schemas.
Example:
If
B
is behindA
, in the composed schemaNotification.message
will be of typeString!
.If
A
is behindB
, in the composed schemaNotification.message
will be of typeString
.graphql-hive/packages/services/schema/src/orchestrators.ts
Lines 61 to 63 in c6568d1
Since we detect schema changes based on diffing composed schemas the service order change can lead to unexpected schema changes being reported, which are unrelated to the schema being published, but related to the changed order of the services that was triggered by a publish.
This confuses users of Hive and makes the predictability and usage of the composed schema (and services CDN endpoint) unsafe.
The text was updated successfully, but these errors were encountered: