Module graphql

Data Types

defer_map()

defer_map() = #{worker => pid(), timeout => non_neg_integer(), apply => [function()]}

directive()

directive() = #directive{}

document()

document() = #document{}

json()

json() = number() | binary() | true | false | null | #{binary() | atom() => json()} | [json()]

param_context()

param_context() = json()

result()

result() = {ok, term()} | {error, term()} | {defer, token()} | {defer, token(), defer_map()}

schema_definition()

schema_definition() = {atom(), #{atom() => term()}}

token()

token() = {'$graphql_token', pid(), reference(), reference()}

Function Index

execute/1
execute/2
format_errors/2
insert_root/1
insert_schema_definition/1insert_schema_definition/1 loads a schema definition into the Graph Schema.
load_schema/2
map/2
monitor/2
parse/1
reply_cast/2
sync/3
throw/1
token/1
type_check/1
type_check_params/3
validate/1
validate_schema/0

Function Details

execute/1

execute(AST::document()) -> #{atom() => json()}

execute/2

execute(Ctx::context(), AST::document()) -> #{atom() => json()}

format_errors/2

format_errors(Ctx, Errs) -> any()

insert_root/1

insert_root(Defn::schema_definition()) -> ok

insert_schema_definition/1

insert_schema_definition(Defn::schema_definition()) -> ok | {error, Reason}

insert_schema_definition/1 loads a schema definition into the Graph Schema

load_schema/2

load_schema(Mapping, Input) -> any()

map/2

map(F, X2) -> any()

monitor/2

monitor(Worker::pid(), X2::result()) -> result()

parse/1

parse(Input::binary() | string()) -> {ok, document()} | {error, {scanner_error | parser_error, term()}}

reply_cast/2

reply_cast(X1::token(), Data::term()) -> ok

sync/3

sync(X1, Pid, Msg) -> any()

throw/1

throw(Msg) -> any()

token/1

token(X1::#{defer_process := pid(), defer_request_id := reference()}) -> token()

type_check/1

type_check(AST::document()) -> {ok, #{atom() => term()}}

type_check_params/3

type_check_params(FunEnv::any(), OpName::any(), Vars::any()) -> param_context()

validate/1

validate(AST::document()) -> ok | {error, term()}

validate_schema/0

validate_schema() -> ok | {error, any()}


Generated by EDoc