1
- import { YogaDriver } from '@graphql-yoga/nestjs' ;
2
1
import { MiddlewareConsumer , Module , NestModule } from '@nestjs/common' ;
3
2
import { APP_INTERCEPTOR } from '@nestjs/core' ;
4
3
import { GraphQLModule as NestGraphqlModule } from '@nestjs/graphql' ;
5
4
import { HttpAdapterHost } from '~/core/http' ;
6
5
import { TracingModule } from '../tracing' ;
6
+ import { Driver } from './driver' ;
7
7
import { GqlContextHost , GqlContextHostImpl } from './gql-context.host' ;
8
8
import { GraphqlErrorFormatter } from './graphql-error-formatter' ;
9
9
import { GraphqlLoggingPlugin } from './graphql-logging.plugin' ;
@@ -29,7 +29,7 @@ export class GraphqlOptionsModule {}
29
29
@Module ( {
30
30
imports : [
31
31
NestGraphqlModule . forRootAsync ( {
32
- driver : YogaDriver ,
32
+ driver : Driver ,
33
33
useExisting : GraphqlOptions ,
34
34
imports : [ GraphqlOptionsModule ] ,
35
35
} ) ,
@@ -51,11 +51,5 @@ export class GraphqlModule implements NestModule {
51
51
// Always attach our GQL Context middleware.
52
52
// It has its own logic to handle non-gql requests.
53
53
consumer . apply ( this . middleware . use ) . forRoutes ( '*' ) ;
54
-
55
- // Setup file upload handling
56
- const fastify = this . app . httpAdapter . getInstance ( ) ;
57
- fastify . addContentTypeParser ( 'multipart/form-data' , ( req , payload , done ) =>
58
- done ( null ) ,
59
- ) ;
60
54
}
61
55
}
0 commit comments