Absinthe.StreamData.TypeMapper behaviour (absinthe_streamdata v0.1.0) View Source

Behaviour for type mappers.

defmodule Test do
  use Absinthe.StreamData.TypeMapper

  def list_of(stream, name) do
    Absinthe.StreamData.DefaultTypeMapper.list_of(stream, name)
  end

  def optional(stream, name) do
    Absinthe.StreamData.DefaultTypeMapper.optional(stream, name)
  end

  def non_null(stream, name) do
    Absinthe.StreamData.DefaultTypeMapper.non_null(stream, name)
  end

  def from_type(type, schema, name, type_mapper) do
    Absinthe.StreamData.DefaultTypeMapper.from_type(type, schema, name, type_mapper)
  end
end

Link to this section Summary

Link to this section Callbacks

Link to this callback

from_type(type, schema, name, type_mapper)

View Source

Specs

from_type(
  type :: any(),
  schema :: Absinthe.Schema.t(),
  name :: binary(),
  type_mapper :: any()
) :: StreamData.t()

Specs

list_of(StreamData.t(), name :: binary()) :: StreamData.t()

Specs

non_null(StreamData.t(), name :: binary()) :: StreamData.t()

Specs

optional(StreamData.t(), name :: binary()) :: StreamData.t()