mirror of
https://github.com/vercel/commerce.git
synced 2025-04-28 13:57:50 +00:00
12 lines
243 B
TypeScript
12 lines
243 B
TypeScript
import { swellConfig } from '../..'
|
|
|
|
const fetchSwellApi = async (
|
|
query: string,
|
|
method: string,
|
|
variables: [] = []
|
|
) => {
|
|
const { swell } = swellConfig
|
|
return await swell[query][method](...variables)
|
|
}
|
|
export default fetchSwellApi
|