Spikard. GraphQLRouteConfig
(spikard v0.15.6-rc.4)
Copy Markdown
Configuration for GraphQL routes
Provides a builder pattern for configuring GraphQL route parameters for the Spikard HTTP server's routing system.
Example
use spikard_graphql::routes::GraphQLRouteConfig;
let config = GraphQLRouteConfig::new()
.path("/graphql")
.method("POST")
.enable_playground(true);
assert_eq!(config.get_path(), "/graphql");
assert_eq!(config.get_method(), "POST");
Summary
Functions
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
Build a default instance.
Set the HTTP path for the GraphQL endpoint
Types
@type t() :: %Spikard.GraphQLRouteConfig{ref: reference()}
Configuration for GraphQL routes
Functions
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
@spec new() :: t()
Build a default instance.
Set the HTTP path for the GraphQL endpoint