Better error messages on passing array of executable schemas.
brainrepo opened this issue · comments
In Mercurius' schema option, we can pass schemas as either a string or an executable schema.
If we pass them as a string, we can also pass an array of schemas in the string type, in which case Mercurius will merge them.
However, if we pass them as an executable schema, we can only pass one.
Currently, there is no check to prevent the passing of an array of executable schemas.
If we pass two executable schemas, we get an error.
Possible solutions:
- improve error handling
- use schema stitching against the executable schemas to get just one executable schema
Lines 148 to 171 in b6ac057
Why would you need to pass an array of executable schemas?
Why would you need to pass an array of executable schemas?
It can be useful if you decide to split in modules your GraphQL application.
In my previous project (pretty big) we divided the GraphQL api in domains/modules and each module was responsible of just few types and resolvers.
understood, makes sense