View Source Absinthe.Subscription.PipelineSerializer (absinthe v1.7.5)
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).
Link to this section Summary
Link to this section 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()}
Link to this section Functions
@spec pack(Absinthe.Pipeline.t()) :: packed_pipeline()
@spec unpack(Absinthe.Pipeline.t() | packed_pipeline()) :: Absinthe.Pipeline.t()