Describe the bug
When using @urql/core 3.2.2 with the default fetch exchange against graphql-yoga 3.8.0, the response will be incorrectly parsed if any part of the response data has the string '---'.
I believe the source of the issue starts here:
|
const boundaryHeader = contentType.match(boundaryHeaderRe); |
|
const boundary = '--' + (boundaryHeader ? boundaryHeader[1] : '-'); |
graphql-yoga sends back a multipart mixed response with the default boundary of just -.
Reproduction
client side: https://codesandbox.io/s/crimson-butterfly-b2u6bl
server side: https://codesandbox.io/p/sandbox/charming-bogdan-exwjdx
Urql version
urql v3.0.4
@urql/core v3.2.2
Validations
Describe the bug
When using @urql/core 3.2.2 with the default fetch exchange against graphql-yoga 3.8.0, the response will be incorrectly parsed if any part of the response data has the string '---'.
I believe the source of the issue starts here:
urql/packages/core/src/internal/fetchSource.ts
Lines 79 to 80 in 9cdb74b
graphql-yogasends back a multipart mixed response with the default boundary of just-.Reproduction
client side: https://codesandbox.io/s/crimson-butterfly-b2u6bl
server side: https://codesandbox.io/p/sandbox/charming-bogdan-exwjdx
Urql version
urql v3.0.4
@urql/core v3.2.2
Validations