I want to use graphql upload
package in nestjs
. But I am facing some error-
Here is my code-
import { GraphqlUpload, FileUpload } from "graphql-upload/GraphQLUpload.mjs";
import { createWriteStream } from 'fs';
@Mutation(() => SuccessInfo, { name: "updateProfile" })
update(
@Args("file", { type: () => GraphqlUpload }) {
createReadStream,
filename
}: FileUpload
) {
console.log(filename);
}
How can I solve this.