package graphql_ppx

  1. Overview
  2. Docs
type type_ref =
  1. | Named of string
  2. | NonNull of type_ref
  3. | List of type_ref
type argument_meta = {
  1. am_name : string;
  2. am_description : string option;
  3. am_arg_type : type_ref;
  4. am_default_value : string option;
}
type field_meta = {
  1. fm_name : string;
  2. fm_description : string option;
  3. fm_arguments : argument_meta list;
  4. fm_field_type : type_ref;
  5. fm_deprecation_reason : string option;
}
type scalar_meta = {
  1. sm_name : string;
  2. sm_description : string option;
}
type object_meta = {
  1. om_name : string;
  2. om_description : string option;
  3. om_fields : field_meta list;
  4. om_interfaces : string list;
}
type enum_value_meta = {
  1. evm_name : string;
  2. evm_description : string option;
  3. evm_deprecation_reason : string option;
}
type enum_meta = {
  1. em_name : string;
  2. em_description : string option;
  3. em_values : enum_value_meta list;
}
type interface_meta = {
  1. im_name : string;
  2. im_description : string option;
  3. im_fields : field_meta list;
}
type union_meta = {
  1. um_name : string;
  2. um_description : string option;
  3. um_of_types : string list;
}
type input_object_meta = {
  1. iom_name : string;
  2. iom_description : string option;
  3. iom_input_fields : argument_meta list;
}
type type_meta =
  1. | Scalar of scalar_meta
  2. | Object of object_meta
  3. | Enum of enum_meta
  4. | Interface of interface_meta
  5. | Union of union_meta
  6. | InputObject of input_object_meta
type schema_meta = {
  1. sm_query_type : string;
  2. sm_mutation_type : string option;
  3. sm_subscription_type : string option;
}
type directive_location =
  1. | Dl_query
  2. | Dl_mutation
  3. | Dl_subscription
  4. | Dl_field
  5. | Dl_fragment_definition
  6. | Dl_fragment_spread
  7. | Dl_inline_fragment
  8. | Dl_unknown
type directive_meta = {
  1. dm_name : string;
  2. dm_locations : directive_location list;
  3. dm_arguments : argument_meta list;
}
type t = {
  1. meta : schema_meta;
  2. type_map : (string, type_meta) Stdlib.Hashtbl.t;
  3. directive_map : (string, directive_meta) Stdlib.Hashtbl.t;
}
val query_type : t -> type_meta
val mutation_type : t -> type_meta option
val subscription_type : t -> type_meta option
exception Invalid_type of string
exception Inconsistent_schema of string
val lookup_implementations : t -> interface_meta -> type_meta list
val lookup_field : type_meta -> string -> field_meta option
val lookup_input_field : type_meta -> string -> argument_meta option
val type_name : type_meta -> string
val is_type_default : type_meta -> bool
val lookup_type : t -> string -> type_meta option
val lookup_directive : t -> string -> directive_meta option
val all_enums : t -> enum_meta list
val extract_name_from_type_meta : type_meta -> string
val compare_type_meta : type_meta -> type_meta -> int
val innermost_name : type_ref -> string
OCaml

Innovation. Community. Security.