File tree Expand file tree Collapse file tree 5 files changed +11
-8
lines changed Expand file tree Collapse file tree 5 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ export class ApolloFederationDriver extends ApolloBaseDriver {
20
20
}
21
21
22
22
async generateSchema ( options : ApolloDriverConfig ) : Promise < GraphQLSchema > {
23
- return await this . graphqlFederationFactory . mergeWithSchema ( options ) ;
23
+ return await this . graphqlFederationFactory . generateSchema ( options ) ;
24
24
}
25
25
26
26
public async start ( options : ApolloDriverConfig ) : Promise < void > {
Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ export abstract class AbstractGraphQLDriver<
38
38
}
39
39
40
40
public async generateSchema ( options : TOptions ) : Promise < GraphQLSchema > {
41
- return await this . graphQlFactory . mergeWithSchema ( options ) ;
41
+ return await this . graphQlFactory . generateSchema ( options ) ;
42
42
}
43
43
44
44
public subscriptionWithFilter (
Original file line number Diff line number Diff line change @@ -48,7 +48,7 @@ export class GraphQLFederationFactory {
48
48
private readonly typeDefsDecoratorFactory : TypeDefsDecoratorFactory ,
49
49
) { }
50
50
51
- async mergeWithSchema < T extends GqlModuleOptions > (
51
+ async generateSchema < T extends GqlModuleOptions > (
52
52
options : T = { } as T ,
53
53
buildFederatedSchema ?: (
54
54
options : BuildFederatedSchemaOptions ,
@@ -59,7 +59,10 @@ export class GraphQLFederationFactory {
59
59
60
60
let schema : GraphQLSchema ;
61
61
if ( options . autoSchemaFile ) {
62
- schema = await this . generateSchema ( options , buildFederatedSchema ) ;
62
+ schema = await this . generateSchemaFromCodeFirst (
63
+ options ,
64
+ buildFederatedSchema ,
65
+ ) ;
63
66
} else if ( isEmpty ( options . typeDefs ) ) {
64
67
schema = options . schema ;
65
68
} else {
@@ -85,7 +88,7 @@ export class GraphQLFederationFactory {
85
88
] ) ;
86
89
}
87
90
88
- private async generateSchema < T extends GqlModuleOptions > (
91
+ private async generateSchemaFromCodeFirst < T extends GqlModuleOptions > (
89
92
options : T ,
90
93
buildFederatedSchema ?: (
91
94
options : BuildFederatedSchemaOptions ,
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ export class GraphQLFactory {
29
29
private readonly gqlSchemaBuilder : GraphQLSchemaBuilder ,
30
30
) { }
31
31
32
- async mergeWithSchema < T extends GqlModuleOptions > (
32
+ async generateSchema < T extends GqlModuleOptions > (
33
33
options : T = { typeDefs : [ ] } as T ,
34
34
) : Promise < GraphQLSchema > {
35
35
const resolvers = this . resolversExplorerService . explore ( ) ;
@@ -100,7 +100,7 @@ export class GraphQLFactory {
100
100
return schema ;
101
101
}
102
102
103
- overrideOrExtendResolvers (
103
+ private overrideOrExtendResolvers (
104
104
executableSchemaConfig : GraphQLSchemaConfig ,
105
105
autoGeneratedSchemaConfig : GraphQLSchemaConfig ,
106
106
) : GraphQLSchemaConfig {
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ export class MercuriusFederationDriver extends AbstractGraphQLDriver<MercuriusDr
31
31
public override async generateSchema (
32
32
options : MercuriusDriverConfig ,
33
33
) : Promise < GraphQLSchema > {
34
- return await this . graphqlFederationFactory . mergeWithSchema (
34
+ return await this . graphqlFederationFactory . generateSchema (
35
35
options ,
36
36
buildMercuriusFederatedSchema ,
37
37
) ;
You can’t perform that action at this time.
0 commit comments