absinthe_plug_cn v1.2.5 Absinthe.Plug.GraphiQL

Enables GraphiQL

Usage

if Mix.env == :dev do
  plug Absinthe.Plug.GraphiQL
end

Interface Selection

The GraphiQL interface can be switched using the :interface option.

  • :advanced (default) will serve the GraphiQL Workspace interface from Oleg Ilyenko.
  • :simple will serve the original GraphiQL interface from Facebook.

See Absinthe.Plug for the other options.

Summary

Functions

Callback implementation for Plug.call/2

Sets up and validates the Absinthe schema

Types

opts()
opts() :: [schema: atom, adapter: atom, path: binary, context: map, json_codec: atom | {atom, Keyword.t}, interface: :advanced | :simple]

Functions

call(conn, config)

Callback implementation for Plug.call/2.

init(opts)
init(opts :: opts) :: map

Sets up and validates the Absinthe schema