View Source AbsintheQueryAll (absinthe_query_all v0.1.1)

Documentation for AbsintheQueryAll.

Summary

Functions

Gets a complete list of all possible operations for the specified operation type (i.e. query, mutation, or subscription).

Runs a query for the specified operation, requesting every possible field in the response.

Functions

Link to this function

get_all_operations(schema, operation_type)

View Source
@spec get_all_operations(Absinthe.Schema.t(), AbsintheQueryAll.Query.Operation.t()) ::
  [atom()]

Gets a complete list of all possible operations for the specified operation type (i.e. query, mutation, or subscription).

Examples

iex> AbsintheQueryAll.get_all_operations(TestAbsintheSchema, :query)
[
  :badTestQuery, :testQuery, :theNumberOneQuery
]
Link to this function

get_comprehensive_response(config)

View Source
@spec get_comprehensive_response(%{
  :operation_type => AbsintheQueryAll.Query.Operation.t(),
  :operation_name => atom(),
  :schema => Absinthe.Schema.t(),
  optional(:context) => any(),
  optional(:argument_generator) => (atom(), atom(), map() -> map())
}) :: {:error, binary()} | {:ok, map()}

Runs a query for the specified operation, requesting every possible field in the response.

Examples

iex> AbsintheQueryAll.get_comprehensive_response(%{
...>   schema: TestAbsintheSchema,
...>   operation_type: :query,
...>   operation_name: :theNumberOneQuery,
...> })
{:ok, %{data: %{"theNumberOneQuery" => 1}}}