Divide fetcher with rest and graphql

This commit is contained in:
goncy
2021-08-25 19:51:15 -03:00
parent d4adfd079f
commit 5d76337f9e
16 changed files with 69 additions and 94 deletions

View File

@@ -0,0 +1,14 @@
import type { GraphQLFetcher } from '@commerce/api'
import type { OrdercloudConfig } from '../'
import { FetcherError } from '@commerce/utils/errors'
const fetchGraphqlApi: (getConfig: () => OrdercloudConfig) => GraphQLFetcher =
() => async () => {
throw new FetcherError({
errors: [{ message: 'GraphQL fetch is not implemented' }],
status: 500,
})
}
export default fetchGraphqlApi