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