mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 09:31:43 -05:00
Do not call mergeSchema unless necessary
This commit is contained in:
parent
ab9bc3b73a
commit
26899c7ff6
1 changed files with 2 additions and 1 deletions
|
@ -75,7 +75,8 @@ const initGraphQL = () => {
|
|||
resolvers: GraphQLSchema.resolvers,
|
||||
schemaDirectives: GraphQLSchema.directives,
|
||||
});
|
||||
const mergedSchema = mergeSchemas({ schemas: [executableSchema, ...GraphQLSchema.stitchedSchemas] });
|
||||
// only call mergeSchemas if we actually have stitchedSchemas
|
||||
const mergedSchema = GraphQLSchema.stitchedSchemas.length > 0 ? mergeSchemas({ schemas: [executableSchema, ...GraphQLSchema.stitchedSchemas] }) : executableSchema;
|
||||
|
||||
GraphQLSchema.finalSchema = typeDefs;
|
||||
GraphQLSchema.executableSchema = mergedSchema;
|
||||
|
|
Loading…
Add table
Reference in a new issue