View Source AbsintheQueryAll.Query.Fields (absinthe_query_all v0.5.0)

Code for generating a query string for a specific field.

Summary

Types

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

Functions

Link to this function

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

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