Is your feature request related to a problem? Please describe.
I am experiencing a similar issue to one previously reported #98 , but in this case, it is with 'multipart/form-data' in our GraphQL requests. Our system is attempting to implement FileUpload following the https://github.com/jaydenseric/graphql-multipart-request-spec, but because the request format is not JSON, JSON.parse fails at graphqlHelpers.ts:L211.
Describe the solution you'd like
I would like to suggest a similar solution to the one proposed for 'x-www-form-urlencoded' request payloads. We could try to decode the payload as 'multipart/form-data' as a failover if JSON.parse fails.
Additional context
I have prepared a demo of the environment where the error occurs at https://gql-file-upload-minimum-example.vercel.app/. I would be glad to contribute towards this change if the maintainers are okay with it.
Is your feature request related to a problem? Please describe. I am experiencing a similar issue to one previously reported #98 , but in this case, it is with 'multipart/form-data' in our GraphQL requests. Our system is attempting to implement FileUpload following the https://github.com/jaydenseric/graphql-multipart-request-spec, but because the request format is not JSON, JSON.parse fails at graphqlHelpers.ts:L211.
Describe the solution you'd like I would like to suggest a similar solution to the one proposed for 'x-www-form-urlencoded' request payloads. We could try to decode the payload as 'multipart/form-data' as a failover if JSON.parse fails.
Additional context I have prepared a demo of the environment where the error occurs at https://gql-file-upload-minimum-example.vercel.app/. I would be glad to contribute towards this change if the maintainers are okay with it.