Subscription Configuration in GraphQL Android Client

Team,
I am using Apollo Android Client to execute Query/Mutation/Subscription Functionality in GraphQL. I am able to use Subscription functionality fine, However i need detailed information about various configurations exposed for Subscription Functionality like how to specify the time out.

Please do share any document or any sample test-case where all the configurations for Subscription Functionality are exposed.

Thanks for your Help!!

Hi!

In terms of configuration (source), you can provide:

  • the WebSocket engine to use (by default will be OkHttp)
  • the WebSocket protocol to use (by default will be subscriptions-transport-ws)
  • HTTP headers used at connection time
  • an idle timeout after which the WebSocket will close if there is no network activity
  • a reopen policy to use when a network error happens

Other than that, the documentation about subscriptions is available here, authentication here and error handling here.

Don’t hesitate to let us know if you have further questions about this.