Questions tagged [graphql-upload]

7 questions
2
votes
1 answer

How to upload a file through Apollo Server v4 and graphql-upload?

im using Apollo server v4 with expressjs and NEXTJS for my Frontend. What I want is to create a Mutation like uploadFile using upload-graphql to upload a file to my Backend Server. upload type export interface Upload { filename: string; …
0
votes
0 answers

ERR_PACKAGE_PATH_NOT_EXPORTED graphql-file upload with nodejs is not working

I'm trying to create a graphql api to upload files using nodejs. I use graphql-upload package to upload the file but it doesn't work. I'm getting 'ERR_PACKAGE_PATH_NOT_EXPORTED' Error. I tried so many solutions but nothing worked. This is the code I…
0
votes
0 answers

How to use nest js guard with GraphQL file upload mutation?

I am implementing file upload functionality in Nest JS GraphQL with Federation. I am using graphql-upload library for file upload. I have encountered an issue that when i send an invalid JWT which is being checked in the guard , The guard is…
0
votes
1 answer

Error at importing the library graphql-upload in a NestJS with GraphQL application

I'm trying to use the library graphql-upload into my application of nestJs with graphQL and when I import the library I get this error: Module '"graphql-upload"' has no exported member 'GraphQLUpload'. This is how I import the library: import {…
0
votes
1 answer

Angular/Mutation Failed to execute 'append' on 'FormData': parameter 2 is not of type 'Blob'

I am using Angular/Apollo(Graphql) on the client side and NestJS on the server side. For uploading files to the server, the 'graphql-upload-ts' package is used. The mutation works without a problem when run through tools like POSTMAN, but when I try…
CaNa
  • 61
  • 2
0
votes
0 answers

Error [ERR_REQUIRE_ESM]: require() of ES not supported

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, {…
Md Ali
  • 217
  • 1
  • 2
  • 10
0
votes
2 answers

How to import graphql-upload?

I am using the graphql-upload package. The export section of the package.json file of the graphql-upload package is like this:- "exports": { "./GraphQLUpload.mjs": "./GraphQLUpload.mjs", "./graphqlUploadExpress.mjs":…
Saswat
  • 12,320
  • 16
  • 77
  • 156