forked from crowetic/commerce
14 lines
273 B
TypeScript
14 lines
273 B
TypeScript
import { swellConfig } from '../../index'
|
|
|
|
const fetchSwellApi = async (
|
|
query: string,
|
|
method: string,
|
|
variables: object | string
|
|
) => {
|
|
const { swell } = swellConfig
|
|
const res = await swell[query][method](variables)
|
|
|
|
return res
|
|
}
|
|
export default fetchSwellApi
|