1
+ import { mergeSchemas } from '@graphql-tools/merge' ;
1
2
import { Injectable } from '@nestjs/common' ;
2
3
import { loadPackage } from '@nestjs/common/utils/load-package.util' ;
3
4
import { isString } from '@nestjs/common/utils/shared.utils' ;
@@ -20,9 +21,9 @@ import {
20
21
isScalarType ,
21
22
isUnionType ,
22
23
} from 'graphql' ;
23
- import { mergeSchemas } from '@graphql-tools/merge' ;
24
24
import { forEach , isEmpty } from 'lodash' ;
25
25
import { GraphQLSchemaBuilder } from '../graphql-schema.builder' ;
26
+ import { GraphQLSchemaHost } from '../graphql-schema.host' ;
26
27
import { GqlModuleOptions } from '../interfaces' ;
27
28
import {
28
29
PluginsExplorerService ,
@@ -31,7 +32,6 @@ import {
31
32
} from '../services' ;
32
33
import { extend } from '../utils' ;
33
34
import { transformSchema } from '../utils/transform-schema.util' ;
34
- import { GraphQLSchemaHost } from '../graphql-schema.host' ;
35
35
36
36
@Injectable ( )
37
37
export class GraphQLFederationFactory {
@@ -231,7 +231,10 @@ export class GraphQLFederationFactory {
231
231
// Bail if inconsistent with original schema
232
232
if (
233
233
! autoGeneratedType ||
234
- ! ( autoGeneratedType instanceof GraphQLUnionType || autoGeneratedType instanceof GraphQLInterfaceType ) ||
234
+ ! (
235
+ autoGeneratedType instanceof GraphQLUnionType ||
236
+ autoGeneratedType instanceof GraphQLInterfaceType
237
+ ) ||
235
238
! autoGeneratedType . resolveType
236
239
) {
237
240
return typeInFederatedSchema ;
0 commit comments