File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ export abstract class AbstractGraphQLDriver<
13
13
protected readonly httpAdapterHost : HttpAdapterHost ;
14
14
15
15
@Inject ( )
16
- protected readonly applicationConfig : ApplicationConfig ;
16
+ protected readonly applicationConfig ? : ApplicationConfig ;
17
17
18
18
@Inject ( )
19
19
protected readonly graphQlFactory : GraphQLFactory ;
@@ -54,7 +54,7 @@ export abstract class AbstractGraphQLDriver<
54
54
}
55
55
56
56
protected getNormalizedPath ( options : TOptions ) : string {
57
- const prefix = this . applicationConfig . getGlobalPrefix ( ) ;
57
+ const prefix = this . applicationConfig ? .getGlobalPrefix ( ) ?? '' ;
58
58
const useGlobalPrefix = prefix && options . useGlobalPrefix ;
59
59
const gqlOptionsPath = normalizeRoutePath ( options . path ) ;
60
60
return useGlobalPrefix
Original file line number Diff line number Diff line change @@ -146,11 +146,6 @@ export class GraphQLModule<
146
146
}
147
147
148
148
async onModuleInit ( ) {
149
- const httpAdapter = this . httpAdapterHost ?. httpAdapter ;
150
- if ( ! httpAdapter ) {
151
- return ;
152
- }
153
-
154
149
const options = await this . _graphQlAdapter . mergeDefaultOptions (
155
150
this . options ,
156
151
) ;
@@ -172,6 +167,11 @@ export class GraphQLModule<
172
167
typeDefs : undefined ,
173
168
} ;
174
169
170
+ const httpAdapter = this . httpAdapterHost ?. httpAdapter ;
171
+ if ( ! httpAdapter ) {
172
+ return ;
173
+ }
174
+
175
175
await this . _graphQlAdapter . start ( completeOptions ) ;
176
176
177
177
if ( options . path ) {
You can’t perform that action at this time.
0 commit comments