mirror of
https://github.com/vercel/commerce.git
synced 2025-07-04 12:11:22 +00:00
Removed unrequired import from saleor
This commit is contained in:
parent
412d6f3b02
commit
6f4dad9a9e
@ -1,10 +1,6 @@
|
|||||||
import type { OperationContext } from '@commerce/api/operations'
|
import type { OperationContext } from '@commerce/api/operations'
|
||||||
import {
|
import { ProductCountableEdge } from '../../schema'
|
||||||
GetAllProductPathsQuery,
|
import type { Provider, SaleorConfig } from '..'
|
||||||
GetAllProductPathsQueryVariables,
|
|
||||||
ProductCountableEdge,
|
|
||||||
} from '../../schema'
|
|
||||||
import type { ShopifyConfig, Provider, SaleorConfig } from '..'
|
|
||||||
|
|
||||||
import { getAllProductsPathsQuery } from '../../utils/queries'
|
import { getAllProductsPathsQuery } from '../../utils/queries'
|
||||||
import fetchAllProducts from '../utils/fetch-all-products'
|
import fetchAllProducts from '../utils/fetch-all-products'
|
||||||
@ -13,10 +9,7 @@ export type GetAllProductPathsResult = {
|
|||||||
products: Array<{ path: string }>
|
products: Array<{ path: string }>
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function getAllProductPathsOperation({
|
export default function getAllProductPathsOperation({ commerce }: OperationContext<Provider>) {
|
||||||
commerce,
|
|
||||||
}: OperationContext<Provider>) {
|
|
||||||
|
|
||||||
async function getAllProductPaths({
|
async function getAllProductPaths({
|
||||||
query,
|
query,
|
||||||
config,
|
config,
|
||||||
@ -24,7 +17,7 @@ export default function getAllProductPathsOperation({
|
|||||||
}: {
|
}: {
|
||||||
query?: string
|
query?: string
|
||||||
config?: SaleorConfig
|
config?: SaleorConfig
|
||||||
variables?: any
|
variables?: any
|
||||||
} = {}): Promise<GetAllProductPathsResult> {
|
} = {}): Promise<GetAllProductPathsResult> {
|
||||||
config = commerce.getConfig(config)
|
config = commerce.getConfig(config)
|
||||||
|
|
||||||
@ -39,7 +32,6 @@ export default function getAllProductPathsOperation({
|
|||||||
path: `/${slug}`,
|
path: `/${slug}`,
|
||||||
})),
|
})),
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return getAllProductPaths
|
return getAllProductPaths
|
||||||
|
Loading…
x
Reference in New Issue
Block a user