Module cowboy_graphql_ws_handler

Cowboy websocket handler for graphql API Supported protocols:

Copyright © (C) 2022, Sergey

Authors: Sergey (me@seriyps.ru).

Description

Cowboy websocket handler for graphql API Supported protocols:

Data Types

config()

abstract datatype: config()

features()

features() = #{subprotocol => protocol()}

options()

options() = #{json_mod => module(), max_frame_size => pos_integer(), protocols => [protocol()], heartbeat => timeout(), idle_timeout => pos_integer()}

protocol()

protocol() = apollo | graphql_ws

Function Index

config/3Creates a structure to be passed as InitialState to Cowboy's router.
init/2
terminate/3
websocket_handle/2
websocket_info/2
websocket_init/1

Function Details

config/3

config(Callback::module(), CallbackOptions::any(), TransportOptions::options()) -> config()

Creates a structure to be passed as InitialState to Cowboy's router. See [https://ninenines.eu/docs/en/cowboy/2.9/manual/cowboy_router/]

init/2

init(Req0, X2) -> any()

terminate/3

terminate(Reason, PartialReq, State) -> any()

websocket_handle/2

websocket_handle(Frame, State) -> any()

websocket_info/2

websocket_info(Any, State) -> any()

websocket_init/1

websocket_init(State) -> any()


Generated by EDoc