commerce/framework/swell/api/utils/fetch-swell-api.ts
2021-05-11 15:00:12 -05:00

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