zf

zenflows testing
git clone https://s.sonu.ch/~srfsh/zf.git
Log | Files | Refs | Submodules | README | LICENSE

list.ex (683B)


      1 defmodule Absinthe.Type.List do
      2   @moduledoc """
      3   A wrapping type which declares the type of each item in the list.
      4 
      5   ## Examples
      6 
      7   Given a type, `:item`, to declare the type of a field/argument as a list of
      8   `:item`-typed values, you could do:
      9 
     10   ```
     11   type: %Absinthe.Type.List{of_type: :item}
     12   ```
     13 
     14   But normally this would be done using `Absinthe.Schema.Notation.list_of/1`.
     15 
     16   ```
     17   type: list_of(:item)
     18   ```
     19   """
     20 
     21   use Absinthe.Introspection.TypeKind, :list
     22   use Absinthe.Type.Fetch
     23 
     24   @typedoc "
     25   A defined list type.
     26 
     27   ## Options
     28 
     29   * `:of_type` - The underlying, wrapped type.
     30  "
     31   @type t :: %__MODULE__{of_type: Absinthe.Type.t()}
     32   defstruct of_type: nil
     33 end