Given the following schemas:
Node 1
extend type Query {
getOrder: Order
}
type Order @key(fields: "id") {
id: ID!
name: String
}
Node 2
type Order @key(fields: "id") {
id: ID!
surname: String
}
The gateway starts correctly instead of throwing.
This is a clear developer's error, as the Node 2's schema should use the extends keyword:
extends type Order {
surname: String
}
In this case, Mercurius should throw an error when:
- there is a naming conflict without the
extends keyword
- the
extends entity must not use the ID! property value
In both the above cases, Apollo server trigger this error:
This data graph is missing a valid configuration. Field "Order.id" can only be defined once.
There can be only one type named "Order".
This would help developers to spot these schema conflicts at first gateway run.
Given the following schemas:
Node 1
Node 2
The gateway starts correctly instead of throwing.
This is a clear developer's error, as the
Node 2's schema should use theextendskeyword:In this case, Mercurius should throw an error when:
extendskeywordextendsentity must not use theID!property valueIn both the above cases, Apollo server trigger this error:
This would help developers to spot these schema conflicts at first gateway run.