View Source Absinthe.Subscription.PipelineSerializer (absinthe v1.7.8)
Serializer responsible for packing and unpacking pipeline stored in the Elixir registry.
The purpose of this logic is saving memory by deduplicating repeating options - (ETS backed registry stores them flat in the memory).
Summary
Types
@type options_label() :: {:options, non_neg_integer()}
@type options_map() :: %{required(options_label()) => Keyword.t()}
@type packed_phase_config() :: Absinthe.Phase.t() | {Absinthe.Phase.t(), options_label()}
@type packed_pipeline() :: {:packed, [packed_phase_config()], options_map()}
Functions
@spec pack(Absinthe.Pipeline.t() | {module(), atom(), list()}) :: packed_pipeline()
@spec unpack(Absinthe.Pipeline.t() | packed_pipeline()) :: Absinthe.Pipeline.t()