I've been updating my Apollo client recently to more accurately reflect the example Singleton that exists in the latest Apollo iOS documentation. I realized that with this new approach you can rely on the HTTPNetworkTransportPreflightDelegate to attach a dynamic auth header to outgoing HTTP requests, which is super helpful seeing I was previously just rebuilding the client on every user login/logout. I was curious if there is any way to achieve something similar with the WebSocket transport... I noticed it only accepts a hard-coded map of connection header values in its constructor that can't be changed.
I'd be happy to help with implementing a solution if one doesn't currently exist... I'm just not exactly sure of the ideal approach seeing the transport would basically have to forcibly reconnect whenever its connection payload changes. It's a much-needed feature of my app, so I'd love to start a discussion about this.
I've been updating my Apollo client recently to more accurately reflect the example Singleton that exists in the latest Apollo iOS documentation. I realized that with this new approach you can rely on the
HTTPNetworkTransportPreflightDelegateto attach a dynamic auth header to outgoing HTTP requests, which is super helpful seeing I was previously just rebuilding the client on every user login/logout. I was curious if there is any way to achieve something similar with the WebSocket transport... I noticed it only accepts a hard-coded map of connection header values in its constructor that can't be changed.I'd be happy to help with implementing a solution if one doesn't currently exist... I'm just not exactly sure of the ideal approach seeing the transport would basically have to forcibly reconnect whenever its connection payload changes. It's a much-needed feature of my app, so I'd love to start a discussion about this.