I have a nestjs apollo graphql gateway where in my app.module i have:
import graphqlUploadExpress from graphql-upload ;
import {
Module,
BadRequestException,
HttpStatus,
HttpException,
UnauthorizedException,
MiddlewareConsumer,
} from @nestjs/common ;
and
export class AppModule {
configure(consumer: MiddlewareConsumer) {
consumer.apply(graphqlUploadExpress()).forRoutes( graphql );
}
}
I am getting a lint error :
This expression is not callable.
Type typeof import("/Applications/flash/flash-gateway/node_modules/@types/graphql-upload/index") has no call signatures
I am using
"graphql-upload": "~16.0.2",
"@types/graphql-upload": "~16.0.0",
Now I understand that some changes in the newer version of graphql-upload has resulted in some breaking changes and some even suggested I should be importing like this:
import graphqlUploadExpress from graphql-upload/graphqlUploadExpress.js
but none of these suggestions works with v16. How do I call the middleware consumer for graphql-upload in v16?