-
-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload scalar return empty object as resolver argument #211
Comments
First, make sure the client is sending a valid GraphQL multipart request to the server. Use the Chrome dev tools network inspector to verify this. Secondly, make sure the Make sure no other middleware is parsing the multipart request, particularly before the |
I believe the issue is not from GraphQL server instead from the resolver itself. Though, I did check all the things you have mentioned add made the required changes for And, the problem seems still persistent. |
If in the server project you run |
Yup, using latest version. Does it request to install this package in frontend (react.js project) where we use the mutation. const mutationUploadImage = gql`
mutation UploadImage(
$image: Upload!
) {
uploadImage(image: $image) {
publicLink
}
}
` My guess would be, when I pass the |
You should have already verified that the front end is sending a valid GraphQL multipart request, so it is irrelevant at this point. |
That doesn't look like a multipart request; your problem is on the client. Setup your client to send the right requests; here are a list of client implementations to choose from: https://github.com/jaydenseric/graphql-multipart-request-spec#client |
Schema
Resolver
This is the resolver to import
Upload
scalarResolver to handle image upload
The
Data
variable return{ image: {} }
The text was updated successfully, but these errors were encountered: