Nodejs graphql-upload Replacement
Introduction Ever since graphql-upload v14, the maintainer has made the controversial decision to force deep imports. This means that you can no longer do this: import {GraphQLUpload} from 'graphql-upload'; Now you have to change that to this: import GraphQLUpload from 'graphql-upload/GraphQLUpload.mjs'; Although this is dubious at best, this seems like a quick fix. It is, except when you use TypeScript. The Proposed “Solutions” Now I’m not going to document all the proposed solutions from the maintainer and the community alike here. I’ve spent quite a few hours trying to fix this myself. I’ve followed this, this, this, that and probably a lot more when I went deep into the rabbit hole. But nothing seemed to work, and even if it did, the “solutions” often meant changing your tsconfig.json to allow JavaScript and **** like that. ...