mirror of
https://github.com/vercel/commerce.git
synced 2025-07-27 04:01:23 +00:00
Divide fetcher with rest and graphql
This commit is contained in:
14
framework/ordercloud/api/utils/fetch-graphql.ts
Normal file
14
framework/ordercloud/api/utils/fetch-graphql.ts
Normal 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
|
Reference in New Issue
Block a user