pify

Types

pub type ShopifyResult(a) {
  ShopifyResult(status: Int, body: a)
}

Constructors

  • ShopifyResult(status: Int, body: a)

Values

pub fn append_path(
  request: request.Request(a),
  path: String,
) -> request.Request(a)
pub fn client(
  key: String,
  domain: String,
  api_version: option.Option(String),
) -> Result(types.ShopifyClient, a)
pub fn fetch(
  client client: types.ShopifyClient,
  query query: String,
  variables variables: option.Option(String),
  decoder decoder: decode.Decoder(a),
) -> Result(ShopifyResult(a), types.ShopifyError)
pub fn fetch_product(
  client: types.ShopifyClient,
  handle: String,
) -> Result(ShopifyResult(types.Product), types.ShopifyError)
pub fn last_split(
  str: String,
  on separator: String,
) -> Result(#(String, String), Nil)

AI constructed. Need to verify logic.

pub fn remove_edges_and_nodes(
  array: types.Connection(a),
) -> List(a)

Remove the edges from the array and return the proper type of the connection.

Essential to work with GraphQL.

pub fn reshape_cart(cart: types.ShopifyCart) -> types.Cart
pub fn reshape_images(
  images: types.Connection(types.Image),
  product_title: String,
) -> List(types.Image)
pub fn reshape_product(
  product: types.ShopifyProduct,
  filter_hidden_products: Bool,
) -> types.Product
pub fn reshape_products(
  products: List(types.ShopifyProduct),
) -> List(types.Product)
Search Document