4
0
forked from crowetic/commerce
commerce/framework/swell/api/utils/fetch-swell-api.ts
2021-04-25 16:34:29 -05:00

12 lines
249 B
TypeScript

import { swellConfig } from '../../index'
const fetchSwellApi = async (
query: string,
method: string,
variables: [] = []
) => {
const { swell } = swellConfig
return await swell[query][method](...variables)
}
export default fetchSwellApi