From fdc9d4ee5a7bc53539c797bcd7a0a2a8e87ad09a Mon Sep 17 00:00:00 2001 From: Igor Date: Tue, 13 Aug 2019 11:28:06 +0400 Subject: [PATCH] Fix namespaces module --- src/pipeline/namespaces.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/pipeline/namespaces.ts b/src/pipeline/namespaces.ts index 614d63c..43715b7 100644 --- a/src/pipeline/namespaces.ts +++ b/src/pipeline/namespaces.ts @@ -2,7 +2,7 @@ import { PipelineModule } from './pipeline-module'; import { DocumentNode, FragmentDefinitionNode, GraphQLObjectType, GraphQLSchema, SelectionSetNode, visit } from 'graphql'; -import { maybeDo } from '../utils/utils'; +import { maybeDo, objectValues } from '../utils/utils'; import { Query } from '../graphql/common'; /** @@ -22,7 +22,8 @@ export class NamespaceModule implements PipelineModule { directives: Array.from(schema.getDirectives()), query: maybeDo(schema.getQueryType(), type => this.wrap(type, 'Query')), mutation: maybeDo(schema.getMutationType(), type => this.wrap(type, 'Mutation')), - subscription: maybeDo(schema.getSubscriptionType(), type => this.wrap(type, 'Subscription')) + subscription: maybeDo(schema.getSubscriptionType(), type => this.wrap(type, 'Subscription')), + types: objectValues(schema.getTypeMap()) }); this.schema = newSchema; return newSchema;