mirror of
https://github.com/vercel/commerce.git
synced 2025-05-18 07:26:59 +00:00
28 lines
635 B
TypeScript
28 lines
635 B
TypeScript
import type { LocalConfig, Provider } from '..'
|
|
import type { OperationContext } from '@commerce/api/operations'
|
|
import { GetAllProductPathsOperation } from '../../types/product'
|
|
|
|
export default function getAllProductPathsOperation({
|
|
commerce,
|
|
}: OperationContext<Provider>) {
|
|
async function getAllProductPaths<T extends GetAllProductPathsOperation>({
|
|
query,
|
|
config,
|
|
variables,
|
|
}: {
|
|
query?: string
|
|
config?: LocalConfig
|
|
variables?: T['variables']
|
|
} = {}): Promise<T['data']> {
|
|
return {
|
|
products: [
|
|
{
|
|
path: `/hank`,
|
|
},
|
|
],
|
|
}
|
|
}
|
|
|
|
return getAllProductPaths
|
|
}
|