Condiment v0.1.2 Condiment View Source
Add flavors to your context APIs easily!
No need to create different functions to cater to different use cases, instead you can have one single public function and add flavors conditionally, with Condiment.
Link to this section Summary
Functions
field
is what you allow users to query for. The resolver is how to resolve that query.
To use Condiment
, you start with the Condiment.new/2,3
interface.
Runs all of the resolvers conditionally based on what user requested, it runs in the order that you defined (not the order the user supplied).
Link to this section Types
Specs
Link to this section Functions
Specs
field
is what you allow users to query for. The resolver is how to resolve that query.
The resolver has to be 2-arity, the first argument is the the result of the previously ran resolver (the first resolver gets token
instead).
Specs
To use Condiment
, you start with the Condiment.new/2,3
interface.
The currently available options for condiment_opts
is:
:on_unknown_fields one of
:nothing,
:error, or
:raise` (default). This option specify what to do when user supplies a field that's not resolvable.
Specs
Runs all of the resolvers conditionally based on what user requested, it runs in the order that you defined (not the order the user supplied).