zf

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

boolean_value.ex (590B)


      1 defmodule Absinthe.Language.BooleanValue do
      2   @moduledoc false
      3 
      4   alias Absinthe.Blueprint
      5 
      6   defstruct [
      7     :value,
      8     :loc
      9   ]
     10 
     11   @type t :: %__MODULE__{
     12           value: boolean,
     13           loc: Absinthe.Language.loc_t()
     14         }
     15 
     16   defimpl Blueprint.Draft do
     17     def convert(node, doc) do
     18       %Blueprint.Input.Boolean{
     19         value: Absinthe.Blueprint.Draft.convert(node.value, doc),
     20         source_location: source_location(node)
     21       }
     22     end
     23 
     24     defp source_location(%{loc: nil}), do: nil
     25     defp source_location(%{loc: loc}), do: Blueprint.SourceLocation.at(loc)
     26   end
     27 end