package graphql-cohttp

  1. Overview
  2. Docs

Parameters

module Ws : Websocket.Connection.S with type 'a IO.t = 'a IO.t

Signature

module Json = Yojson.Basic.Util
val (>>=) : 'a IO.t -> ('a -> 'b IO.t) -> 'b IO.t
type t = {
  1. conn : Ws.t;
  2. subscriptions : (string, unit -> unit) Hashtbl.t;
}
type client_message =
  1. | Gql_connection_init
  2. | Gql_start of {
    1. id : string;
    2. query : string;
    3. variables : (string * Graphql_parser.const_value) list option;
    4. operation_name : string option;
    }
  3. | Gql_stop of {
    1. id : string;
    }
  4. | Gql_connection_terminate
type server_message =
  1. | Gql_connection_error
  2. | Gql_connection_ack
  3. | Gql_data
  4. | Gql_error
  5. | Gql_complete
val client_message_of_payload : Yojson__Basic.t -> (client_message, string) result
val server_message_to_string : server_message -> string
val create_message : ?opcode:Websocket.Frame.Opcode.t -> ?id:string -> ?payload:Yojson.Basic.t -> server_message -> Websocket.Frame.t
val handle_frame : t -> execute_query: ((string * Graphql_parser.const_value) list option -> string option -> string -> ([< `Response of Yojson.Basic.t | `Stream of (Yojson.Basic.t, Yojson.Basic.t) result IO.Stream.t ], Yojson.Basic.t) result IO.t) -> Websocket.Frame.t -> unit Ws.IO.t
val handle : ((string * Graphql_parser.const_value) list option -> string option -> string -> ([< `Response of Yojson.Basic.t | `Stream of (Yojson.Basic.t, Yojson.Basic.t) result IO.Stream.t ], Yojson.Basic.t) result IO.t) -> Ws.t -> 'a IO.t
OCaml

Innovation. Community. Security.