File upload is not working using react-query with graphql in react native #3714
Unanswered
Gopika-Ramanan
asked this question in
Q&A
Replies: 2 comments 1 reply
-
not sure what the question here is? If it works without react-query, it should work with react-query. The mutation is just a wrapper that delays the execution of the function until you call |
Beta Was this translation helpful? Give feedback.
0 replies
-
Upload file in GraphQL should follow those spec : https://github.com/jaydenseric/graphql-multipart-request-spec I think React query does not handle it by default ??
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Mutation: mutation UploadFile($file: Upload!) {
uploadFile(file: $file)
}
Trying to upload an image selected from gallery by using react-native-image-crop-picker
const file = new File([result[0].data], fileName, {type: result[0].mime, lastModified: result[0].modificationDate})
Beta Was this translation helpful? Give feedback.
All reactions