plug_graphql v0.2.0 GraphQL.Plug
This is the primary plug for mounting a GraphQL server.
It includes GraphiQL support and a default pipeline
which parses various content-types for POSTs
(including application/graphql
, application/json
, form and multipart).
You mount GraphQL.Plug
using Plug or Phoenix, and pass it your schema:
forward "/graphql", GraphQL.Plug, schema: {MyApp.Schema, :schema}
You can build your own pipeline by mounting the
GraphQL.Plug.Endpoint
plug directly. You may want to preserve how this
pipeline configures the Plug.Parsers
in that case.
Summary
Types
init :: %{schema: GraphQL.Schema.t, root_value: ConfigurableValue.t, query: ConfigurableValue.t, allow_graphiql?: true | false}