Apollo
const cloudinary = require("cloudinary").v2;
Hello, am having similar issue, i tried to follow the example above but is still not work.
Am using apollo graphql to pass body of post and file upload, at the backend i console.log(file) and it shows the result below but i console.log(stream) it gives undefile . am trying to store it cloudinary before storing the link at MongoDb, but is the storing of the file at cloudinary working.
Am having this error "
- TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be one of type string, Buffer, or URL. Received type undefined"


The is the mutation
mutation ($body: String!, $file : Upload){
createPost(body: $body, file: $file){
id body createdAt username
likes{
id createdAt username
}
likeCount
comments{
id body createdAt username
}
commentCount
}
}
`;
Thanks for your help
0
Post is closed for comments.
Comments
1 comment