cosmo
cosmo copied to clipboard
feat: create subsciption over multipart
trafficstars
Motivation and Context
One of the methods that Apollo recommends using is HTTP Multipart for subscriptions, as described here and here
This PR enables the router to follow the same protocol, so that it can respond in the format:
--graphql
content-type: application/json
{}
--graphql
content-type: application/json
{"payload":{"data":{"productPriceChanged":{"name":"Croissant","price":400,"reviews":[{"score":5}]}}}}
--graphql
content-type: application/json
{"payload":{"data":{"productPriceChanged":{"name":"Croissant","price":375,"reviews":[{"score":5}]}}}}
--graphql
content-type: application/json
{"payload":{"data":{"productPriceChanged":{"name":"Croissant","price":425,"reviews":[{"score":5}]}}}}
--graphql--
TODO
- [ ] Tests or benchmark included
- [ ] Documentation is changed or added on https://app.gitbook.com/
- [ ] PR title must follow conventional-commit-standard