diff --git a/lib/graphql-federation.factory.ts b/lib/graphql-federation.factory.ts index 5f1ad4d67..cf8307ffe 100644 --- a/lib/graphql-federation.factory.ts +++ b/lib/graphql-federation.factory.ts @@ -33,7 +33,7 @@ export class GraphQLFederationFactory { // Enable support when Directive support in type-graphql goes stable throw new Error('Code-first not supported yet'); schema = await this.generateSchema(options); - } else if (!isEmpty(options.typeDefs)) { + } else if (isEmpty(options.typeDefs)) { schema = options.schema; } else { schema = this.buildSchemaFromTypeDefs(options); diff --git a/tests/e2e/typegraphql-federation.spec.ts b/tests/e2e/typegraphql-federation.spec.ts index cf1de8ca6..6e7e33fe2 100644 --- a/tests/e2e/typegraphql-federation.spec.ts +++ b/tests/e2e/typegraphql-federation.spec.ts @@ -1,14 +1,14 @@ import { INestApplication } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import * as request from 'supertest'; -import { ApplicationModule } from '../type-graphql-federation/app.module'; +// import { ApplicationModule } from '../type-graphql-federation/app.module'; describe.skip('TypeGraphQL - Federation', () => { let app: INestApplication; beforeEach(async () => { const module = await Test.createTestingModule({ - imports: [ApplicationModule], + imports: [], // ApplicationModule], }).compile(); app = module.createNestApplication();