Skip to content
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

Batching operations (array) returns BadRequestError #142

Closed
rlux opened this issue Apr 24, 2019 · 2 comments
Closed

Batching operations (array) returns BadRequestError #142

rlux opened this issue Apr 24, 2019 · 2 comments
Labels

Comments

@rlux
Copy link

rlux commented Apr 24, 2019

When using an array inside the operations field, I always get this error:
BadRequestError: Invalid type for the ‘operations’ multipart field

I used the example query from here https://github.com/jaydenseric/graphql-multipart-request-spec#curl-request-2

When using a single object instead of an array, it works.

Looking into the source code, I found the check isObject(operations). This seems to return false for arrays. Please also allow arrays in that type check!

@jaydenseric
Copy link
Owner

jaydenseric commented Apr 25, 2019

Oof, if that's happening it's certainly not meant to! Let's add a test and fix it.

@jaydenseric
Copy link
Owner

Fix published in v8.0.6 🚀

krasivyy3954 added a commit to krasivyy3954/react-graphql-upload that referenced this issue Jan 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants