-
Notifications
You must be signed in to change notification settings - Fork 249
Open
Labels
enhancementNew feature or requestNew feature or request
Description
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
extendskeyword - the
extendsentity must not use theID!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.
guilherme-sato and inaiat
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request