4
0
forked from crowetic/commerce

Merge pull request #12 from okbel/zeit-fetch

Use @zeit/fetch server-side
This commit is contained in:
Luis Alvarez D 2020-10-25 17:31:55 -05:00 committed by GitHub
commit 966de82b34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -1,7 +1,8 @@
import { FetcherError } from '@lib/commerce/utils/errors'
import type { GraphQLFetcher } from 'lib/commerce/api'
import type { GraphQLFetcher } from '@lib/commerce/api'
import { getConfig } from '..'
import log from '@lib/logger'
import fetch from './fetch'
const fetchGraphqlApi: GraphQLFetcher = async (
query: string,

View File

@ -1,5 +1,6 @@
import { getConfig } from '..'
import { BigcommerceApiError, BigcommerceNetworkError } from './errors'
import fetch from './fetch'
export default async function fetchStoreApi<T>(
endpoint: string,

View File

@ -0,0 +1,3 @@
import zeitFetch from '@zeit/fetch'
export default zeitFetch()