Coder Social home page Coder Social logo

Graphql-upload not working for Type-Graphql based project But old version of graphql-upload (.js) version works about graphql-upload HOT 1 CLOSED

isarojdahal avatar isarojdahal commented on May 25, 2024
Graphql-upload not working for Type-Graphql based project But old version of graphql-upload (.js) version works

from graphql-upload.

Comments (1)

jaydenseric avatar jaydenseric commented on May 25, 2024

I'm sorry but I don't think I will be able to help much with this because it involves debugging your project and its dependencies. If I could offer an obvious solution from the clues you've provided I would; but nothing jumps out at me.

If you have the correct project setup you should be able to get the latest version of graphql-upload working fine in a TypeScript project; I do so successfully at work in our project.

I suspect that whatever dependency you are using to build your schema is generating CJS modules instead of ESM, and they are attempting to require the GraphQLUpload scalar which is ESM, which is an invalid thing to do. You mentioned TypeGraphQL; so the logical place to start is to check it's working correctly with ESM. It looks like they have bugs to be fixed on their end:

MichalLytek/type-graphql#1442

If you figure out a solution, feel free to report it here in case it helps anyone googling a similar issue.

from graphql-upload.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.