init.ex (526B)
1 defmodule Absinthe.Phase.Init do 2 @moduledoc false 3 4 use Absinthe.Phase 5 6 alias Absinthe.{Blueprint, Language, Phase} 7 8 @spec run(String.t() | Language.Source.t() | Blueprint.t(), Keyword.t()) :: Phase.result_t() 9 def run(input, _options \\ []) do 10 {:record_phases, make_blueprint(input), 11 fn bp, phases -> 12 %{bp | initial_phases: phases} 13 end} 14 end 15 16 defp make_blueprint(%Absinthe.Blueprint{} = blueprint) do 17 blueprint 18 end 19 20 defp make_blueprint(input) do 21 %Blueprint{input: input} 22 end 23 end