Summary
Apollo iOS v2.0.3's MultipartResponseDeferParser throws ParsingError.cannotParseChunkData when handling multipart GraphQL responses with @defer if the server sends the close delimiter (--graphql--\r\n) as a separate HTTP chunk.
This is a change from Apollo iOS v1, which handled this case with a check for chunk.isDashBoundaryPrefix in MultipartResponseParsingInterceptor.
Version
2.0.3
Steps to reproduce the behavior
- Use Apollo iOS SDK v2.0.3
- Execute a GraphQL query with @defer directive that returns a multipart response
- Server sends multipart response where the final close delimiter
--graphql--\r\n arrives as its own separate chunk
Logs
/// Raw response from Proxyman with json payload redacted.
HTTP/1.1 200 OK
Content-Type: multipart/mixed;boundary="graphql";deferSpec=20220824
Transfer-Encoding: chunked
Connection: keep-alive
--graphql
content-type: application/json
{"data":{},"hasNext":true}
--graphql
content-type: application/json
{"hasNext":false,"incremental":[]}
--graphql--
Anything else?
No response