mirror of
https://github.com/vercel/commerce.git
synced 2025-07-26 19:51:23 +00:00
feat: get favorite products
This commit is contained in:
16
framework/vendure/schema.d.ts
vendored
16
framework/vendure/schema.d.ts
vendored
@@ -3203,6 +3203,16 @@ export type ActiveCustomerQuery = { __typename?: 'Query' } & {
|
||||
>,
|
||||
>
|
||||
}
|
||||
|
||||
export type QueryFavorite = {
|
||||
options: FavoriteListOptions
|
||||
}
|
||||
|
||||
export type FavoriteListOptions = {
|
||||
skip?: Maybe<Scalars['Int']>
|
||||
take?: Maybe<Scalars['Int']>
|
||||
}
|
||||
|
||||
export type FavoriteList = PaginatedList & {
|
||||
items: [Favorite!]!
|
||||
totalItems: Int!
|
||||
@@ -3216,6 +3226,12 @@ type Favorite = Node & {
|
||||
customer: Customer!
|
||||
}
|
||||
|
||||
|
||||
|
||||
type FavouriteOption = Customer & {
|
||||
favorites(options: FavoriteListOptions): FavoriteList!
|
||||
}
|
||||
|
||||
export type GetAllProductPathsQueryVariables = Exact<{
|
||||
first?: Maybe<Scalars['Int']>
|
||||
}>
|
||||
|
@@ -1,5 +1,3 @@
|
||||
import { searchResultFragment } from '../fragments/search-result-fragment'
|
||||
|
||||
export const activeCustomerQuery = /* GraphQL */ `
|
||||
query activeCustomer {
|
||||
activeCustomer {
|
||||
@@ -11,15 +9,6 @@ export const activeCustomerQuery = /* GraphQL */ `
|
||||
items{
|
||||
product{
|
||||
id
|
||||
name
|
||||
slug
|
||||
assets{
|
||||
source
|
||||
preview
|
||||
}
|
||||
variants{
|
||||
price
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,27 @@
|
||||
export const getFavoriteProductQuery = /* GraphQL */ `
|
||||
query activeCustomer($options: FavoriteListOptions) {
|
||||
activeCustomer {
|
||||
id
|
||||
firstName
|
||||
lastName
|
||||
emailAddress
|
||||
favorites(options: $options){
|
||||
items{
|
||||
product{
|
||||
id
|
||||
name
|
||||
slug
|
||||
assets{
|
||||
source
|
||||
preview
|
||||
}
|
||||
variants{
|
||||
price
|
||||
}
|
||||
}
|
||||
}
|
||||
totalItems
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
Reference in New Issue
Block a user