Skip to content

Commit

Permalink
fix: invert logic for providing your own schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Rick Dutour Geerling committed Jan 20, 2020
1 parent ef2e409 commit c8ba590
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/graphql-federation.factory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions tests/e2e/typegraphql-federation.spec.ts
Original file line number Diff line number Diff line change
@@ -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();
Expand Down

0 comments on commit c8ba590

Please sign in to comment.