package graphql_ppx

  1. Overview
  2. Docs
type path = string list
type extracted_type =
  1. | Type of Schema.type_meta
  2. | TypeNotFound of string
  3. | Nullable of extracted_type
  4. | List of extracted_type
type object_field =
  1. | Field of {
    1. type_ : Result_structure.t;
    2. loc_key : Source_pos.ast_location;
    3. loc : Source_pos.ast_location;
    4. path : path;
    5. arguments : Graphql_ast.arguments;
    }
  2. | Fragment of {
    1. module_name : string;
    2. key : string;
    3. loc_key : Source_pos.ast_location;
    4. type_name : string option;
    }
and type_def =
  1. | Object of {
    1. loc : Source_pos.ast_location;
    2. variant_parent : bool;
    3. path : path;
    4. existing_type : string option;
    5. fields : object_field list;
    6. interface_fragments : (string * (string * Result_structure.t) list) option;
    }
  2. | VariantSelection of {
    1. loc : Source_pos.ast_location;
    2. path : path;
    3. fields : (Result_structure.name * Result_structure.t) list;
    }
  3. | VariantUnion of {
    1. loc : Source_pos.ast_location;
    2. path : path;
    3. fields : (Result_structure.name * Result_structure.t) list;
    4. omit_future_value : bool;
    }
  4. | VariantInterface of {
    1. name : string;
    2. loc : Source_pos.ast_location;
    3. path : path;
    4. fragments : (string * Result_structure.t) list;
    }
  5. | Enum of {
    1. loc : Source_pos.ast_location;
    2. path : path;
    3. fields : string list;
    4. omit_future_value : bool;
    }
type input_object_field =
  1. | InputField of {
    1. type_ : extracted_type;
    2. name : string;
    3. loc : Source_pos.ast_location;
    4. loc_type : Source_pos.ast_location option;
    }
type arg_type_def =
  1. | NoVariables
  2. | InputObject of {
    1. name : string option;
    2. fields : input_object_field list;
    3. loc : Source_pos.ast_location;
    4. is_recursive : bool;
    }
val extract : ?fragment_def:bool -> ?variant:bool -> path:path -> raw:bool -> Result_structure.t -> type_def list
val generate_type_name : ?prefix:string -> path -> string
val get_inner_type : extracted_type -> extracted_type option
val has_required_variables : arg_type_def list -> bool