package graphql-lwt

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Graphql_lwt.SchemaSource

GraphQL schema with Lwt support

include Graphql_intf.Schema with type 'a Io.t = 'a Lwt.t and type 'a Io.Stream.t = 'a Lwt_stream.t * (unit -> unit) and type field_error = string
Sourcemodule Io : Graphql_intf.IO with type 'a t = 'a Lwt.t with type 'a Stream.t = 'a Lwt_stream.t * (unit -> unit)
Sourcemodule StringMap : sig ... end
Sourcetype field_error = string

Base types

Sourcetype 'ctx schema
Sourcetype ('ctx, 'src) field
Sourcetype 'ctx subscription_field
Sourcetype ('ctx, 'src) typ
Sourcetype 'a enum_value

Constructors

Sourceval schema : ?mutation_name:string -> ?mutations:('ctx, unit) field list -> ?subscription_name:string -> ?subscriptions:'ctx subscription_field list -> ?query_name:string -> ('ctx, unit) field list -> 'ctx schema
Sourcetype deprecated =
  1. | NotDeprecated
  2. | Deprecated of string option
Sourceval enum_value : ?doc:string -> ?deprecated:deprecated -> string -> value:'a -> 'a enum_value
Sourceval obj : ?doc:string -> string -> fields:('ctx, 'src) field list -> ('ctx, 'src option) typ
Sourcemodule Arg : sig ... end
Sourcetype 'ctx resolve_info = {
  1. ctx : 'ctx;
  2. field : Graphql_parser.field;
  3. fragments : fragment_map;
  4. variables : variable_map;
}
Sourceval field : ?doc:string -> ?deprecated:deprecated -> string -> typ:('ctx, 'a) typ -> args:('a, 'b) Arg.arg_list -> resolve:('ctx resolve_info -> 'src -> 'b) -> ('ctx, 'src) field
Sourceval io_field : ?doc:string -> ?deprecated:deprecated -> string -> typ:('ctx, 'a) typ -> args:(('a, field_error) result Io.t, 'b) Arg.arg_list -> resolve:('ctx resolve_info -> 'src -> 'b) -> ('ctx, 'src) field
Sourceval subscription_field : ?doc:string -> ?deprecated:deprecated -> string -> typ:('ctx, 'out) typ -> args:(('out Io.Stream.t, field_error) result Io.t, 'args) Arg.arg_list -> resolve:('ctx resolve_info -> 'args) -> 'ctx subscription_field
Sourceval enum : ?doc:string -> string -> values:'a enum_value list -> ('ctx, 'a option) typ
Sourceval scalar : ?doc:string -> string -> coerce:('a -> Yojson.Basic.t) -> ('ctx, 'a option) typ
Sourceval list : ('ctx, 'src) typ -> ('ctx, 'src list option) typ
Sourceval non_null : ('ctx, 'src option) typ -> ('ctx, 'src) typ
Sourcetype ('ctx, 'a) abstract_value
Sourcetype ('ctx, 'a) abstract_typ = ('ctx, ('ctx, 'a) abstract_value option) typ
Sourceval union : ?doc:string -> string -> ('ctx, 'a) abstract_typ
Sourcetype abstract_field
Sourceval abstract_field : ?doc:string -> ?deprecated:deprecated -> string -> typ:(_, 'a) typ -> args:('a, _) Arg.arg_list -> abstract_field
Sourceval interface : ?doc:string -> string -> fields:(('ctx, 'a) abstract_typ -> abstract_field list) -> ('ctx, 'a) abstract_typ
Sourceval add_type : ('ctx, 'a) abstract_typ -> ('ctx, 'src option) typ -> 'src -> ('ctx, 'a) abstract_value
Sourcetype 'a fixpoint = {
  1. obj : 'ctx 'src 'typ 'b. ?doc:string -> string -> fields:('a -> ('ctx, 'src) field list) -> ('ctx, 'src option) typ;
  2. interface : 'ctx 'src. ?doc:string -> string -> fields:('a -> abstract_field list) -> ('ctx, 'src) abstract_typ;
}
Sourceval fix : ('a fixpoint -> 'a) -> 'a

Built-in scalars

Sourceval int : ('ctx, int option) typ
Sourceval string : ('ctx, string option) typ
Sourceval guid : ('ctx, string option) typ
Sourceval bool : ('ctx, bool option) typ
Sourceval float : ('ctx, float option) typ
Sourcetype variables = (string * Graphql_parser.const_value) list
Sourcetype 'a response = ('a, Yojson.Basic.t) result
Sourceval execute : 'ctx schema -> 'ctx -> ?variables:variables -> ?operation_name:string -> Graphql_parser.document -> [ `Response of Yojson.Basic.t | `Stream of Yojson.Basic.t response Io.Stream.t ] response Io.t

execute schema ctx variables doc evaluates the doc against schema with the given context ctx and variables.

OCaml

Innovation. Community. Security.