zino-hofmann / graphql-flutter

A GraphQL client for Flutter, bringing all the features from a modern GraphQL client to one easy to use package.
https://zino-hofmann.github.io/graphql-flutter
MIT License
3.23k stars 613 forks source link

Support of Multipart HTTP Protocol for GraphQL Subscriptions #1352

Open moloti opened 1 year ago

moloti commented 1 year ago

Is your feature request related to a problem? Please describe. Apollo GraphQL introduced a new subscription protocol and implemented it into their Apollo Client Libraries. Their new Apollo Gateway replacement Apollo Router is only supporting this subscription protocol based on HTTP instead of WebSockets.

Describe the solution you'd like It would be great if the graphql-flutter library could support this protocol, as it's needed for everyone who wants to use subscriptions with Apollo Router or Apollo Federation. Here is a link to the description of the protocol: https://www.apollographql.com/docs/router/executing-operations/subscription-multipart-protocol/ And here is a link to the issue in the apollo client libraries: https://github.com/apollographql/apollo-client/pull/10592/commits

Describe alternatives you've considered The only other way of using subscriptions on the new Apollo Stack is to implement a sidecar WebSocket Service with a standalone API. But if this library would support this, no flutter developer would need this. Wundergraph is also working on an alternative to Apollo Router, but it's unclear when this one will be released and if they are also setting on the Multipart HTTP Protocol or normal Websockets.

Additional context

vincenzopalazzo commented 1 year ago

Yeah but I not thinnk this will happens any time soon, but ofc PR are welcome

rlch commented 1 year ago

+1 , this is a blocker to us taking up Federated subscriptions.