Apq v1.0.0 Apq.DocumentProvider View Source
Apq document provider or Absinthe plug.
Example
Example configuration for using Apq in Absinthe.Plug
. Same goes for configuring
Phoenix.
match("/api",
to: Absinthe.Plug,
init_opts: [
schema: ApqExample.Schema,
json_codec: Jason,
interface: :playground,
document_providers: [ApqExample.Apq, Absinthe.Plug.DocumentProvider.Default]
]
)
When the Apq document provider does not match (i.e. the apq extensions are not set in the request),
the request is passed to the next document provider. This will most likely by the default
provider available (Absinthe.Plug.DocumentProvider.Default
).