View Source GraphQLWSClient.Drivers.Gun (GraphQL Websocket Client v2.0.2)
A driver using the :gun
library to connect to the GraphQL websocket.
Usage
The Gun driver is configured as default driver using Jason as default encoder and decoder. However, you still need to install the particular libraries yourself if you want to use them, so add these to your deps.
{:gun, "~> 2.0"},
{:jason, "~> 1.4"},
Available Options
See GraphQLWSClient.Driver
to find out how to pass options to the driver.
:ack_timeout
- The number of milliseconds to wait for aconnection_ack
after initiating the connection. Defaults to5000
.:connect_options
- Connection options forwarded to:gun.open/3
. See:gun.opts/0
for all available options.:json_library
- The library used to encode and decode JSON payloads.Jason
by default.:upgrade_timeout
- The number of milliseconds to wait for a connection upgrade. Defaults to5000
.