@@ -49,8 +49,8 @@ export type HiveGatewayDriverConfig<
4949export class HiveGatewayDriver <
5050 TContext extends Record < string , any > ,
5151> extends AbstractGraphQLDriver < HiveGatewayDriverConfig < TContext > > {
52- #gatewayRuntime : GatewayRuntime < TContext > | undefined ;
53- #subscriptionService ?: GqlSubscriptionService ;
52+ private _gatewayRuntime : GatewayRuntime < TContext > | undefined ;
53+ private _subscriptionService ?: GqlSubscriptionService ;
5454
5555 public async start ( {
5656 schema,
@@ -87,7 +87,7 @@ export class HiveGatewayDriver<
8787 ...configCtx ,
8888 cache,
8989 } ) ;
90- this . #gatewayRuntime = createGatewayRuntime ( {
90+ this . _gatewayRuntime = createGatewayRuntime ( {
9191 logging : configCtx . logger ,
9292 cache,
9393 graphqlEndpoint : options . path ,
@@ -133,7 +133,7 @@ export class HiveGatewayDriver<
133133 options . subscriptions || { 'graphql-ws' : { } } ;
134134 if ( subscriptionsOptions [ 'graphql-ws' ] ) {
135135 const gwOptions = getGraphQLWSOptions < TContext , any > (
136- this . #gatewayRuntime ,
136+ this . _gatewayRuntime ,
137137 ( ctx ) => ( {
138138 req : ctx . extra ?. request ,
139139 socket : ctx . extra ?. socket ,
@@ -161,7 +161,7 @@ export class HiveGatewayDriver<
161161 } ,
162162 ws : WebSocket ,
163163 ) => {
164- if ( ! this . #gatewayRuntime ) {
164+ if ( ! this . _gatewayRuntime ) {
165165 throw new Error ( 'Hive Gateway is not initialized' ) ;
166166 }
167167 const {
@@ -171,7 +171,7 @@ export class HiveGatewayDriver<
171171 contextFactory,
172172 parse,
173173 validate,
174- } = this . #gatewayRuntime . getEnveloped ( {
174+ } = this . _gatewayRuntime . getEnveloped ( {
175175 ...params . context ,
176176 req :
177177 // @ts -expect-error upgradeReq does exist but is untyped
@@ -197,9 +197,9 @@ export class HiveGatewayDriver<
197197 return args ;
198198 } ;
199199 }
200- this . #subscriptionService = new GqlSubscriptionService (
200+ this . _subscriptionService = new GqlSubscriptionService (
201201 {
202- schema : await this . #gatewayRuntime . getSchema ( ) ,
202+ schema : await this . _gatewayRuntime . getSchema ( ) ,
203203 path : options . path ,
204204 // @ts -expect-error - We know that execute and subscribe are defined
205205 execute : ( args ) => args . rootValue . execute ( args ) ,
@@ -213,23 +213,23 @@ export class HiveGatewayDriver<
213213 }
214214
215215 public async stop ( ) : Promise < void > {
216- await this . #subscriptionService ?. stop ( ) ;
217- await this . #gatewayRuntime ?. dispose ( ) ;
216+ await this . _subscriptionService ?. stop ( ) ;
217+ await this . _gatewayRuntime ?. dispose ( ) ;
218218 }
219219
220220 private registerExpress ( ) {
221- this . httpAdapterHost . httpAdapter . use ( this . #gatewayRuntime ) ;
221+ this . httpAdapterHost . httpAdapter . use ( this . _gatewayRuntime ) ;
222222 }
223223 private registerFastify ( ) {
224224 this . httpAdapterHost . httpAdapter
225225 . getInstance ( )
226226 . all ( '*' , async ( req : FastifyRequest , reply : FastifyReply ) => {
227- if ( ! this . #gatewayRuntime ) {
227+ if ( ! this . _gatewayRuntime ) {
228228 throw new Error ( 'Hive Gateway is not initialized' ) ;
229229 }
230230 // Second parameter adds Fastify's `req` and `reply` to the GraphQL Context
231231 const response =
232- await this . #gatewayRuntime . handleNodeRequestAndResponse ( req , reply , {
232+ await this . _gatewayRuntime . handleNodeRequestAndResponse ( req , reply , {
233233 req,
234234 reply,
235235 } ) ;
0 commit comments