package graphql_parser

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

GraphQL query parser

type const_value = [
  1. | `Null
  2. | `Int of int
  3. | `Float of float
  4. | `String of string
  5. | `Bool of bool
  6. | `Enum of string
  7. | `List of const_value list
  8. | `Assoc of (string * const_value) list
]
val sexp_of_const_value : const_value -> Ppx_sexp_conv_lib.Sexp.t
val const_value_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> const_value
val __const_value_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> const_value
type value = [
  1. | `Null
  2. | `Int of int
  3. | `Float of float
  4. | `String of string
  5. | `Bool of bool
  6. | `Enum of string
  7. | `Variable of string
  8. | `List of value list
  9. | `Assoc of (string * value) list
]
val sexp_of_value : value -> Ppx_sexp_conv_lib.Sexp.t
val value_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> value
val __value_of_sexp__ : Ppx_sexp_conv_lib.Sexp.t -> value
type directive = {
  1. name : string;
  2. arguments : (string * value) list;
}
val sexp_of_directive : directive -> Ppx_sexp_conv_lib.Sexp.t
val directive_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> directive
type fragment_spread = {
  1. name : string;
  2. directives : directive list;
}
val sexp_of_fragment_spread : fragment_spread -> Ppx_sexp_conv_lib.Sexp.t
val fragment_spread_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> fragment_spread
type selection =
  1. | Field of field
  2. | FragmentSpread of fragment_spread
  3. | InlineFragment of inline_fragment
and field = {
  1. alias : string option;
  2. name : string;
  3. arguments : (string * value) list;
  4. directives : directive list;
  5. selection_set : selection list;
}
and inline_fragment = {
  1. type_condition : string option;
  2. directives : directive list;
  3. selection_set : selection list;
}
val sexp_of_selection : selection -> Ppx_sexp_conv_lib.Sexp.t
val sexp_of_field : field -> Ppx_sexp_conv_lib.Sexp.t
val sexp_of_inline_fragment : inline_fragment -> Ppx_sexp_conv_lib.Sexp.t
val selection_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> selection
val field_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> field
val inline_fragment_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> inline_fragment
type fragment = {
  1. name : string;
  2. type_condition : string;
  3. directives : directive list;
  4. selection_set : selection list;
}
val sexp_of_fragment : fragment -> Ppx_sexp_conv_lib.Sexp.t
val fragment_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> fragment
type typ =
  1. | NamedType of string
  2. | ListType of typ
  3. | NonNullType of typ
val sexp_of_typ : typ -> Ppx_sexp_conv_lib.Sexp.t
val typ_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> typ
type variable_definition = {
  1. name : string;
  2. typ : typ;
  3. default_value : const_value option;
}
val sexp_of_variable_definition : variable_definition -> Ppx_sexp_conv_lib.Sexp.t
val variable_definition_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> variable_definition
type optype =
  1. | Query
  2. | Mutation
  3. | Subscription
val sexp_of_optype : optype -> Ppx_sexp_conv_lib.Sexp.t
val optype_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> optype
type operation = {
  1. optype : optype;
  2. name : string option;
  3. variable_definitions : variable_definition list;
  4. directives : directive list;
  5. selection_set : selection list;
}
val sexp_of_operation : operation -> Ppx_sexp_conv_lib.Sexp.t
val operation_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> operation
type definition =
  1. | Operation of operation
  2. | Fragment of fragment
val sexp_of_definition : definition -> Ppx_sexp_conv_lib.Sexp.t
val definition_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> definition
type document = definition list
val sexp_of_document : document -> Ppx_sexp_conv_lib.Sexp.t
val document_of_sexp : Ppx_sexp_conv_lib.Sexp.t -> document
val parse : string -> (document, string) Pervasives.result