View Source AbsinthePlugCache.Plug.DocumentProvider.Default (absinthe_plug_cache v1.5.8)

This is the default document provider, implementing the AbsinthePlugCache.Plug.DocumentProvider behaviour.

This document provider will handle any document that's provided:

  • As the body of an HTTP POST with content-type application/graphql
  • As the parsed "query" parameter in an HTTP POST of content-type application/json
  • As the "query" parameter in an HTTP GET query string

(Note that the parsing itself happens in AbsinthePlugCache.Plug.Parser / AbsinthePlugCache.Plug; this document provider just knows how to work with the value.)

configuring

Configuring

By default, this is the only document provider configured by AbsinthePlugCache.Plug.init/1.

Using the :document_providers option, however, you can:

See the documentation on AbsinthePlugCache.Plug.init/1 for more details on the :document_providers option.