mercurius
mercurius copied to clipboard
Throw GraphQL Schema error when federated schemas are not extend each other properly
Aims to resolve #826
This is currently an experimental draft PR as I get an understanding of what the desired behaviours are for merging federated schema types. The overall idea is that if a schema comes together and non value types do not correctly extend each other within that, then it should throw a GraphQL schema validation error.
I'm pretty certain the current code doesn't do exhaustive checks on ensuring entity types are identical when they haven't been extended - but hopefully at least it gives some ideas on how that might work. I know in another part of the code base for value types there is also a TODO: for ensuring equality between value types.
One other aspect I am not totally sure on is if the order of extension matters, for example if the schema extends a type before it has been defined, but it is defined later in the schema.