Neuron.Config.set

You're seeing just the function set, go back to Neuron.Config module for more information.

Specs

set(value :: keyword()) :: :ok

sets global configuration values for Neuron

Examples

iex> Neuron.Config.set(url: "http://example.com/graph")
:ok

Specs

set(context :: :global | :process, value :: keyword()) :: :ok

sets global/process configuration values for Neuron

Available options are:

  • url: graphql endpoint url
  • headers: headers to be sent in the request
  • connection_opts: additional options to be passed to connection library
  • connection_module: module to be used for connecting to GQL API. Default is Neuron.Connection.Http
  • json_library: JSON library. Default is Jason.
  • parse_options: options to be passed to the JSON library when decoding JSON

Examples

iex> Neuron.Config.set(headers: [name: "val"])
:ok

iex> Neuron.Config.set(:process, url: "http://example.com/graph")
:ok

iex> Neuron.Config.set(json_library: Jason)
:ok

iex> Neuron.Config.set(parse_options: [keys: :atoms])
:ok