![]() ![]() ![]() Defaults to whatever is set in :json_codec. :serializer - (Optional) Similar to :json_codec but allows the use of serialization formats other than JSON, like MessagePack or Erlang Term Format.If a module name is not provided, Application.get_env(:absinthe, :schema) will be attempt to find one. :schema - (Required, if not handled by Mix.Config) The Absinthe schema to use.See for more information about document providers, their role in procesing requests, and how you can define and configure your own. A simple list of document providers can also be given. If you need to set a value (like a cookie) on the connection after resolutionīut before values are sent to the client, use the :before_send option: plug Absinthe.Plug, schema : MyApp.Schema, before_send :, which configures as the lone document provider). If you are using Phoenix.Router, forward expects different arguments: Plug.Router forward "/graphiql", to :, init_opts : Phoenix.Router forward "/graphiql", , schema : MyAppWeb.Schema, interface : :simpleįor more information see /4. To add support for a GraphiQL interface, add a configuration forĪ: forward "/graphiql", to :, init_opts : įor more information, see the API documentation for Absinthe.Plug. ![]() Type for information on the available options. Router like: plug Plug.Parsers, parsers :, pass :, json_decoder : Jason forward "/api", to : Absinthe.Plug, init_opts : If you want only Absinthe.Plug to serve a particular route, configure your In your router: plug Plug.Parsers, parsers :, pass :, json_decoder : Jason plug Absinthe.Plug, schema : MyAppWeb.Schema Absinthe.Plug (absinthe_plug v1.5.8) View Source ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |