34#ifndef PROTOCORE_GRAPHQL_H
35#define PROTOCORE_GRAPHQL_H
44enum class pc_gql_type : uint8_t
67bool pc_gql_arg_int(
const pc_gql_args *args,
const char *name,
long long *out);
69bool pc_gql_arg_str(
const pc_gql_args *args,
const char *name,
const char **out);
71bool pc_gql_arg_bool(
const pc_gql_args *args,
const char *name,
bool *out);
79typedef bool (*pc_gql_resolver_fn)(
const char *path,
const pc_gql_args *args, pc_gql_value *out);
82enum class pc_gql_result : int32_t
85 PC_GQL_ERR_PARSE = -1,
86 PC_GQL_ERR_LIMIT = -2,
87 PC_GQL_ERR_OVERFLOW = -3
102pc_gql_result pc_graphql_execute(
const char *query,
size_t len, pc_gql_resolver_fn resolver,
char *out,
size_t cap);
User-facing configuration for ProtoCore.