Closed kamalkech closed 3 years ago
Closing because this repo is for maintaining the spec itself, but this issue seems to be more of a request for help debugging your project.
Take a close look at the JSON you’re using in the operations
field; it has some weird key
and value
stuff going on. Hope that helps!
Oh the field operations we have exactly what we found on your documentation (readme file), so i create this issue to make sure if i have a mistake or not, but i put 100% what i found on your documentation, so plz before close
Must to remove this plugins, bye
Find solution
@Mutation(() => Boolean)
async uploadFile(
@Args({ name: 'file', type: () => GraphQLUpload })
{ createReadStream, filename }: FileUpload,
): Promise<boolean> {
const result: Promise<boolean> = new Promise(async (resolve, reject) =>
createReadStream()
.pipe(createWriteStream(`./uploads/${filename}`))
.on('finish', () => resolve(true))
.on('error', () => reject(false)),
);
return result;
}
- operations : { "query": "mutation ($file: Upload!) { uploadFile(file: $file) }", "variables": { "file": null } }
- map : { "0": ["variables.file"] }
- 0 : file.jpg
i put 100% what i found on your documentation
No, you didn't. We can all see that you edited the issue description:
Must to remove this plugins, bye
This repo is not a plugin, it's a specification used by many different GraphQL clients and servers.
I'm not sure why you seem to be upset; I helped you solve your problem 10 minutes after you raised the issue. What's more it's nearly midnight my time in Melbourne, Australia.
Anyway, glad you got it working.
Postman :
Result get this error message:
any idea ??