Skip to content

Commit d44ff1c

Browse files
chore(): minor tweaks
1 parent 0af4f4a commit d44ff1c

File tree

3 files changed

+716
-16473
lines changed

3 files changed

+716
-16473
lines changed

lib/federation/graphql-federation.factory.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { mergeSchemas } from '@graphql-tools/merge';
12
import { Injectable } from '@nestjs/common';
23
import { loadPackage } from '@nestjs/common/utils/load-package.util';
34
import { isString } from '@nestjs/common/utils/shared.utils';
@@ -20,9 +21,9 @@ import {
2021
isScalarType,
2122
isUnionType,
2223
} from 'graphql';
23-
import { mergeSchemas } from '@graphql-tools/merge';
2424
import { forEach, isEmpty } from 'lodash';
2525
import { GraphQLSchemaBuilder } from '../graphql-schema.builder';
26+
import { GraphQLSchemaHost } from '../graphql-schema.host';
2627
import { GqlModuleOptions } from '../interfaces';
2728
import {
2829
PluginsExplorerService,
@@ -31,7 +32,6 @@ import {
3132
} from '../services';
3233
import { extend } from '../utils';
3334
import { transformSchema } from '../utils/transform-schema.util';
34-
import { GraphQLSchemaHost } from '../graphql-schema.host';
3535

3636
@Injectable()
3737
export class GraphQLFederationFactory {
@@ -231,7 +231,10 @@ export class GraphQLFederationFactory {
231231
// Bail if inconsistent with original schema
232232
if (
233233
!autoGeneratedType ||
234-
!(autoGeneratedType instanceof GraphQLUnionType || autoGeneratedType instanceof GraphQLInterfaceType) ||
234+
!(
235+
autoGeneratedType instanceof GraphQLUnionType ||
236+
autoGeneratedType instanceof GraphQLInterfaceType
237+
) ||
235238
!autoGeneratedType.resolveType
236239
) {
237240
return typeInFederatedSchema;

0 commit comments

Comments
 (0)