4
0
forked from crowetic/commerce
commerce/framework/swell/api/utils/fetch-swell-api.ts
2021-04-09 16:57:59 -06:00

13 lines
250 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