mercurius
mercurius copied to clipboard
Gateway does not merge Query, Mutation and Subscription properly if `extend` is not used
The gateway doesn't merge services schema correctly if extend
is not used.
The following schemas:
type Notification {
id: ID!
message: String
}
type Query {
notifications: [Notification]
}
type User {
id: ID!
name: String
}
type Query {
users: [User]
}
Produces:
directive @external on FIELD_DEFINITION
directive @requires(fields: _FieldSet!) on FIELD_DEFINITION
directive @provides(fields: _FieldSet!) on FIELD_DEFINITION
directive @key(fields: _FieldSet!) on OBJECT | INTERFACE
directive @extends on OBJECT | INTERFACE
scalar _Any
scalar _FieldSet
type User {
id: ID!
name: String
}
type Query {
notifications: [Notification]
}
type Notification {
id: ID!
message: String
}
Current workaround: always use extend type Query/Mutation/Subscription
for federated services.
Related to: #262