Permit.Absinthe.Schema.Meta (permit_absinthe v0.3.1)

Copy Markdown View Source

This module provides a way to extract meta information from a field's return type in a resolver.

Part of the private API and not meant for public use.

Summary

Functions

get_field_meta_from_resolution(resolution, meta_keys)

get_type_meta_from_resolution(resolution, meta_keys)

Extracts meta information from a field's return type in a resolver.

Examples

def resolve_article(_, _, resolution) do
  meta = get_type_meta_from_resolution(resolution)
  # meta will contain %{schema: Blog.Content.Article}
  # ...
end

get_type_name(resolution)