complexity.ex (727B)
1 defmodule Absinthe.Complexity do 2 @moduledoc """ 3 Extra metadata passed to aid complexity analysis functions, describing the 4 current field's environment. 5 """ 6 alias Absinthe.{Blueprint, Schema} 7 8 @enforce_keys [:context, :root_value, :schema, :definition] 9 defstruct [:context, :root_value, :schema, :definition] 10 11 @typedoc """ 12 - `:definition` - The Blueprint definition for this field. 13 - `:context` - The context passed to `Absinthe.run`. 14 - `:root_value` - The root value passed to `Absinthe.run`, if any. 15 - `:schema` - The current schema. 16 """ 17 @type t :: %__MODULE__{ 18 definition: Blueprint.node_t(), 19 context: map, 20 root_value: any, 21 schema: Schema.t() 22 } 23 end