Spikard (spikard v0.15.6-rc.7)

Copy Markdown

High-level API for spikard

Summary

Functions

Stable machine-readable error type identifier (SCREAMING_SNAKE_CASE).

Whether the error condition is transient and may succeed on retry.

Convert error to HTTP status code

Set a custom description for documentation

Enable or disable the GraphQL Playground UI

Get the description if set

Get the configured method

Get the configured path

Check if playground is enabled

Set the HTTP method for the GraphQL endpoint

Set the HTTP path for the GraphQL endpoint

Create a schema configuration with all three root types.

Create a schema configuration with Query and Mutation types.

Create a simple schema configuration with only Query type.

Functions

graphqlerror_error_type(msg)

@spec graphqlerror_error_type(String.t()) :: String.t()

Stable machine-readable error type identifier (SCREAMING_SNAKE_CASE).

graphqlerror_is_transient(msg)

@spec graphqlerror_is_transient(String.t()) :: boolean()

Whether the error condition is transient and may succeed on retry.

graphqlerror_status_code(msg)

@spec graphqlerror_status_code(String.t()) :: non_neg_integer()

Convert error to HTTP status code

graphqlrouteconfig_default()

graphqlrouteconfig_description(obj, description)

Set a custom description for documentation

graphqlrouteconfig_enable_playground(obj, enable)

Enable or disable the GraphQL Playground UI

graphqlrouteconfig_get_description(obj)

Get the description if set

graphqlrouteconfig_get_method(obj)

Get the configured method

graphqlrouteconfig_get_path(obj)

Get the configured path

graphqlrouteconfig_is_playground_enabled(obj)

Check if playground is enabled

graphqlrouteconfig_method(obj, method)

Set the HTTP method for the GraphQL endpoint

graphqlrouteconfig_path(obj, path)

Set the HTTP path for the GraphQL endpoint

schema_full()

@spec schema_full() :: map()

Create a schema configuration with all three root types.

schema_query_mutation()

@spec schema_query_mutation() :: map()

Create a schema configuration with Query and Mutation types.

schema_query_only()

@spec schema_query_only() :: map()

Create a simple schema configuration with only Query type.