4
0
forked from crowetic/commerce
commerce/framework/commerce/utils/default-fetcher.ts
2021-02-18 16:06:19 -05:00

13 lines
286 B
TypeScript

import type { HookFetcherFn } from './types'
const defaultFetcher: HookFetcherFn<any> = ({ options, fetch }) =>
fetch(options)
export const mutationFetcher: HookFetcherFn<any> = ({
input,
options,
fetch,
}) => fetch({ ...options, body: input })
export default defaultFetcher