Shopify.GraphQL.Client behaviour (shopify_graphql v1.6.0)

Behaviour for implementing an HTTP client.

Link to this section Summary

Link to this section Types

Link to this type

response_t()

Specs

response_t() :: %{
  body: binary(),
  headers: Shopify.GraphQL.http_headers_t(),
  status_code: pos_integer()
}

Link to this section Callbacks

Link to this callback

request(method, url, headers, body, opts)

Specs

request(
  method :: Shopify.GraphQL.http_method_t(),
  url :: String.t(),
  headers :: Shopify.GraphQL.http_headers_t(),
  body :: binary(),
  opts :: any()
) :: {:ok, response_t()} | {:error, any()}