Absinthe.ConnTest (absinthe_conn_test v0.0.0) View Source

Conveniences for testing GraphQL APIs.

You'll probably want to import this module in your ConnCase.

Link to this section Summary

Functions

Execute a query against the configured @endpoint and @graphql path.

Import queries from a file and convert them to test functions.

Link to this section Types

Specs

error() :: String.t() | {String.t(), map()}

Specs

query() :: String.t()

Specs

response() :: {:ok, term()} | {:error, [error()]}

Specs

variables() :: keyword() | map()

Link to this section Functions

Link to this macro

graphql(conn, query, variables \\ %{})

View Source (macro)

Specs

graphql(Plug.Conn.t(), query(), variables()) :: Macro.t()

Execute a query against the configured @endpoint and @graphql path.

Link to this function

graphql(conn, endpoint, path, query, variables)

View Source

Specs

graphql(Plug.Conn.t(), term(), String.t(), query(), variables()) :: response()
Link to this macro

import_queries(path)

View Source (macro)

Specs

import_queries(Path.t()) :: Macro.t()

Import queries from a file and convert them to test functions.