Update Vendure provider to latest API changes (#352)

Relates to #349
This commit is contained in:
Michael Bromley
2021-06-02 16:46:38 +02:00
committed by GitHub
parent a98c95d447
commit 0e804d09f9
81 changed files with 1265 additions and 698 deletions

View File

@@ -1,18 +0,0 @@
import { getConfig, VendureConfig } from '../api'
async function getCustomerWishlist({
config,
variables,
includeProducts,
}: {
url?: string
variables: any
config?: VendureConfig
includeProducts?: boolean
}): Promise<any> {
// Not implemented as Vendure does not ship with wishlist functionality at present
config = getConfig(config)
return { wishlist: {} }
}
export default getCustomerWishlist

View File

@@ -1,12 +1,12 @@
import { SWRHook } from '@commerce/utils/types'
import useCustomer, { UseCustomer } from '@commerce/customer/use-customer'
import { Customer } from '@commerce/types'
import { ActiveCustomerQuery } from '../schema'
import { activeCustomerQuery } from '../lib/queries/active-customer-query'
import { activeCustomerQuery } from '../utils/queries/active-customer-query'
import { CustomerHook } from '../types/customer'
export default useCustomer as UseCustomer<typeof handler>
export const handler: SWRHook<Customer | null> = {
export const handler: SWRHook<CustomerHook> = {
fetchOptions: {
query: activeCustomerQuery,
},