MathiasKandelborg/TRUE-framework

View on GitHub
util/api/calls/getAllProducts.ts

Summary

Maintainability
A
0 mins
Test Coverage
import { Product } from 'cms/Product'
import { getClient } from '..'
import allProducts from '../queries/allProducts'
/**
 * @returns {Promise<Product[]>} All categories
 */
async function getAllProducts(): Promise<Product[]> {
  const data: Product[] = await getClient(false).fetch(allProducts)

  return data
}

export default getAllProducts