Skip to content

Commit

Permalink
Do not add an extra schema definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ardatan committed Dec 4, 2018
1 parent 960df3c commit 7088570
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions packages/core/src/graphql-module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,9 @@ export class GraphQLModule<Config = any, Request = any, Context = any> {
if (selfTypeDefs) {
typeDefsSet.add(selfTypeDefs);
}
this._cache.typeDefs = mergeGraphQLSchemas([...typeDefsSet]);
this._cache.typeDefs = mergeGraphQLSchemas([...typeDefsSet], {
useSchemaDefinition: false,
});
}
return this._cache.typeDefs;
}
Expand Down Expand Up @@ -289,7 +291,9 @@ export class GraphQLModule<Config = any, Request = any, Context = any> {
if (typeof typeDefsDefinitions === 'string') {
typeDefs = parse(typeDefsDefinitions);
} else if (Array.isArray(typeDefsDefinitions)) {
typeDefs = mergeGraphQLSchemas(typeDefsDefinitions);
typeDefs = mergeGraphQLSchemas(typeDefsDefinitions, {
useSchemaDefinition: false,
});
} else if (typeDefsDefinitions) {
typeDefs = typeDefsDefinitions;
}
Expand Down Expand Up @@ -533,7 +537,9 @@ export class GraphQLModule<Config = any, Request = any, Context = any> {

try {
if (typeDefsToBeMerged.size || allExtraSchemas.size) {
const mergedTypeDefs = mergeGraphQLSchemas([...allExtraSchemas, ...typeDefsToBeMerged]);
const mergedTypeDefs = mergeGraphQLSchemas([...allExtraSchemas, ...typeDefsToBeMerged], {
useSchemaDefinition: false,
});
this._cache.typeDefs = mergedTypeDefs;
const localSchema = makeExecutableSchema<ModuleContext<Context>>({
typeDefs: mergedTypeDefs,
Expand Down

0 comments on commit 7088570

Please sign in to comment.