apollographql / apollo-kotlin

:rocket:  A strongly-typed, caching GraphQL client for the JVM, Android, and Kotlin multiplatform.
https://www.apollographql.com/docs/kotlin
MIT License
3.76k stars 653 forks source link

GraphQL Subscription not support connectionParams. #850

Closed jchbh-duplicate closed 6 years ago

jchbh-duplicate commented 6 years ago

In subscriptions-transport-ws, the client allow to send connectionParams when connect_init, which is a core function to support JWT or other token for the subscription.

Can we offer something that can send this, and if it is possible, can also expose the socket object too so we can manual reconnect to server when refresh the token.

jchbh-duplicate commented 6 years ago

Right now I just copy the WebSocketSubscriptionTransport code and change the send() method to handle OperationClientMessage.Init with another logic.