package graphql_parser

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
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
]
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
]
type directive = {
  1. name : string;
  2. arguments : (string * value) list;
}
type fragment_spread = {
  1. name : string;
  2. directives : directive list;
}
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;
}
type fragment = {
  1. name : string;
  2. type_condition : string;
  3. directives : directive list;
  4. selection_set : selection list;
}
type typ =
  1. | NamedType of string
  2. | ListType of typ
  3. | NonNullType of typ
type variable_definition = {
  1. name : string;
  2. typ : typ;
  3. default_value : const_value option;
}
type optype =
  1. | Query
  2. | Mutation
  3. | Subscription
type operation = {
  1. optype : optype;
  2. name : string option;
  3. variable_definitions : variable_definition list;
  4. directives : directive list;
  5. selection_set : selection list;
}
type definition =
  1. | Operation of operation
  2. | Fragment of fragment
type document = definition list
val parse : string -> (document, string) Stdlib.result
val pp_document : document Fmt.t