View Source Vigil (vigil v0.4.4)

Documentation for Vigil.

As a gatekeeper for your GraphQL API, Vigil disallows introspection of a GraphQL schema and sanitizes error messages to be completely generic and not reveal information about your schema.

This plug disables graphql introspection by returning a Forbidden status if an introspection query of any kind is contained in the query string.

It also returns a Not Found if an request is made on a non-existent field, and Bad Request if required arguments are missing.

For more information about introspection queries see the GraphQL documentation here.

Link to this section Summary

Functions

Callback implementation for Plug.call/2.

Callback implementation for Plug.init/1.

Link to this section Types

@type token() :: binary() | mfa()

Link to this section Functions

@spec call(Plug.Conn.t(), map()) :: Plug.Conn.t()

Callback implementation for Plug.call/2.

@spec init(allow_introspection: boolean(), log_level: Logger.level(), token: token()) ::
  map()

Callback implementation for Plug.init/1.