mix absinthe.gen.resolver (absinthe_generator v0.1.1) View Source
Generates an Absinthe Schema
Options
:app_name
- Required. Application name you're generating the code under:resolver_name
- Required. name of the resolver:moduledoc
- Moduledoc message can be injected into the resulting output code:resolver_functions
- Resolver functions to inject in, these are just inserted right into the resolver The default value is[]
.
Specifying Middleware
To specify middleware we can utilize the following syntax
pre_middleware:mutation:AuthMiddleware post_middleware:all:ChangesetErrorFormatter
Middleware can be set for mutation
, query
, subscription
or all
and can
also be set to either run pre or post resolution using pre_middleware
or post_middleware
Example
mix absinthe.gen.resolver func_name:2:MyModule.function
--app-name MyApp
--resolver-name students
--moduledoc "this is the test"
Link to this section Summary
Functions
Callback implementation for Mix.Task.run/1
.
Link to this section Functions
Callback implementation for Mix.Task.run/1
.