AbsintheGenerator.CrudResource (absinthe_generator v0.1.2) View Source

We can utilize this module to generate crud resource files as well as add them into the schema.ex

Definitions

  • :app_name (String.t/0) - Required. Application name you're generating the code under

  • :resource_name (String.t/0) - Required. The query or mutation namespace to organize the code under

  • :moduledoc (String.t/0) - Moduledoc message can be injected into the resulting output code

  • :context_module (term/0) - Required.

  • :resource_fields (list of String.t/0) - Required.

  • :only

  • :except

Link to this section Summary

Link to this section Types

Specs

crud_type() :: :create | :find | :index | :update | :delete | :find_and_upsert

Specs

t() :: %AbsintheGenerator.CrudResource{
  app_name: String.t(),
  context_module: module(),
  except: [crud_type()],
  moduledoc: String.t(),
  only: [crud_type()],
  resource_fields: [{field_name :: String.t(), field_type :: String.t()}],
  resource_name: String.t()
}

Link to this section Functions

Link to this function

input_type_object(resource_name, resource_fields)

View Source
Link to this function

type_object(resource_name, resource_fields)

View Source