View Source AbsintheQueryAll.Query.Field (absinthe_query_all v0.3.0)

Code for generating a query string for a specific field.

Summary

Types

@type permitted_fields() :: %{optional(atom()) => nil | scalar() | permitted_fields()}
@type scalar() :: binary() | integer() | float() | boolean()
@type t() :: %{
  args: [],
  deprecationReason: binary() | nil,
  description: binary() | nil,
  isDeprecated: boolean(),
  name: atom(),
  type: AbsintheQueryAll.Query.TypeLayer.t()
}

Functions

Link to this function

query_string(field, available_types, opts \\ %{})

View Source
@spec query_string(
  AbsintheQueryAll.Query.Type.t(),
  [AbsintheQueryAll.Query.Type.t()],
  %{
    optional(:permitted_fields) => permitted_fields(),
    optional(:leaf_alias_generator) => (atom(),
                                        AbsintheQueryAll.Query.Type.details() ->
                                          any()),
    optional(any()) => any()
  }
) :: binary()