mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 12:24:18 +00:00
fix: add get-all-pages-query
This commit is contained in:
parent
ec918b2aa3
commit
9c8a78360d
142
framework/woocommerce/schema.d.ts
vendored
142
framework/woocommerce/schema.d.ts
vendored
@ -8821,6 +8821,8 @@ export type Product = {
|
||||
localAttributes?: Maybe<ProductToLocalProductAttributeConnection>
|
||||
/** Menu order */
|
||||
menuOrder?: Maybe<Scalars['Int']>
|
||||
/** Object meta data */
|
||||
metaData?: Maybe<Array<Maybe<MetaData>>>
|
||||
/** Date product last updated */
|
||||
modified?: Maybe<Scalars['String']>
|
||||
/** Product name */
|
||||
@ -8912,6 +8914,13 @@ export type ProductLocalAttributesArgs = {
|
||||
where?: Maybe<ProductToLocalProductAttributeConnectionWhereArgs>
|
||||
}
|
||||
|
||||
/** Product object */
|
||||
export type ProductMetaDataArgs = {
|
||||
key?: Maybe<Scalars['String']>
|
||||
keysIn?: Maybe<Array<Maybe<Scalars['String']>>>
|
||||
multiple?: Maybe<Scalars['Boolean']>
|
||||
}
|
||||
|
||||
/** Product object */
|
||||
export type ProductPaColorsArgs = {
|
||||
first?: Maybe<Scalars['Int']>
|
||||
@ -11269,8 +11278,6 @@ export type Refund = Node & {
|
||||
date?: Maybe<Scalars['String']>
|
||||
/** The globally unique identifier for the refund */
|
||||
id: Scalars['ID']
|
||||
/** Connection between the Refund type and the LineItem type */
|
||||
lineItems?: Maybe<RefundToLineItemConnection>
|
||||
/** Object meta data */
|
||||
metaData?: Maybe<Array<Maybe<MetaData>>>
|
||||
/** Reason for refund */
|
||||
@ -11281,14 +11288,6 @@ export type Refund = Node & {
|
||||
title?: Maybe<Scalars['String']>
|
||||
}
|
||||
|
||||
/** A refund object */
|
||||
export type RefundLineItemsArgs = {
|
||||
first?: Maybe<Scalars['Int']>
|
||||
last?: Maybe<Scalars['Int']>
|
||||
after?: Maybe<Scalars['String']>
|
||||
before?: Maybe<Scalars['String']>
|
||||
}
|
||||
|
||||
/** A refund object */
|
||||
export type RefundMetaDataArgs = {
|
||||
key?: Maybe<Scalars['String']>
|
||||
@ -11304,26 +11303,6 @@ export enum RefundIdTypeEnum {
|
||||
Id = 'ID',
|
||||
}
|
||||
|
||||
/** Connection between the Refund type and the LineItem type */
|
||||
export type RefundToLineItemConnection = {
|
||||
__typename?: 'RefundToLineItemConnection'
|
||||
/** Edges for the RefundToLineItemConnection connection */
|
||||
edges?: Maybe<Array<Maybe<RefundToLineItemConnectionEdge>>>
|
||||
/** The nodes of the connection, without the edges */
|
||||
nodes?: Maybe<Array<Maybe<LineItem>>>
|
||||
/** Information about pagination in a connection. */
|
||||
pageInfo?: Maybe<WpPageInfo>
|
||||
}
|
||||
|
||||
/** An edge in a connection */
|
||||
export type RefundToLineItemConnectionEdge = {
|
||||
__typename?: 'RefundToLineItemConnectionEdge'
|
||||
/** A cursor for use in pagination */
|
||||
cursor?: Maybe<Scalars['String']>
|
||||
/** The item at the end of the edge */
|
||||
node?: Maybe<LineItem>
|
||||
}
|
||||
|
||||
/** Input for the registerCustomer mutation */
|
||||
export type RegisterCustomerInput = {
|
||||
/** User's AOL IM account. */
|
||||
@ -12143,8 +12122,12 @@ export type RootQuery = {
|
||||
customers?: Maybe<RootQueryToCustomerConnection>
|
||||
/** Fields of the 'DiscussionSettings' settings group */
|
||||
discussionSettings?: Maybe<DiscussionSettings>
|
||||
/** A simple product object */
|
||||
externalProduct?: Maybe<ExternalProduct>
|
||||
/** Fields of the 'GeneralSettings' settings group */
|
||||
generalSettings?: Maybe<GeneralSettings>
|
||||
/** A simple product object */
|
||||
groupedProduct?: Maybe<GroupProduct>
|
||||
/** An object of the mediaItem Type. */
|
||||
mediaItem?: Maybe<MediaItem>
|
||||
/**
|
||||
@ -12244,6 +12227,8 @@ export type RootQuery = {
|
||||
shippingMethod?: Maybe<ShippingMethod>
|
||||
/** Connection between the RootQuery type and the ShippingMethod type */
|
||||
shippingMethods?: Maybe<RootQueryToShippingMethodConnection>
|
||||
/** A simple product object */
|
||||
simpleProduct?: Maybe<SimpleProduct>
|
||||
/** A 0bject */
|
||||
tag?: Maybe<Tag>
|
||||
/** Connection between the RootQuery type and the tag type */
|
||||
@ -12272,6 +12257,8 @@ export type RootQuery = {
|
||||
userRoles?: Maybe<RootQueryToUserRoleConnection>
|
||||
/** Connection between the RootQuery type and the User type */
|
||||
users?: Maybe<RootQueryToUserConnection>
|
||||
/** A simple product object */
|
||||
variableProduct?: Maybe<VariableProduct>
|
||||
/** Returns the current user */
|
||||
viewer?: Maybe<User>
|
||||
/** A 0bject */
|
||||
@ -12387,6 +12374,18 @@ export type RootQueryCustomersArgs = {
|
||||
where?: Maybe<RootQueryToCustomerConnectionWhereArgs>
|
||||
}
|
||||
|
||||
/** The root entry point into the Graph */
|
||||
export type RootQueryExternalProductArgs = {
|
||||
id?: Maybe<Scalars['ID']>
|
||||
idType?: Maybe<ProductIdTypeEnum>
|
||||
}
|
||||
|
||||
/** The root entry point into the Graph */
|
||||
export type RootQueryGroupedProductArgs = {
|
||||
id?: Maybe<Scalars['ID']>
|
||||
idType?: Maybe<ProductIdTypeEnum>
|
||||
}
|
||||
|
||||
/** The root entry point into the Graph */
|
||||
export type RootQueryMediaItemArgs = {
|
||||
id: Scalars['ID']
|
||||
@ -12715,6 +12714,12 @@ export type RootQueryShippingMethodsArgs = {
|
||||
before?: Maybe<Scalars['String']>
|
||||
}
|
||||
|
||||
/** The root entry point into the Graph */
|
||||
export type RootQuerySimpleProductArgs = {
|
||||
id?: Maybe<Scalars['ID']>
|
||||
idType?: Maybe<ProductIdTypeEnum>
|
||||
}
|
||||
|
||||
/** The root entry point into the Graph */
|
||||
export type RootQueryTagArgs = {
|
||||
id: Scalars['ID']
|
||||
@ -12816,6 +12821,12 @@ export type RootQueryUsersArgs = {
|
||||
where?: Maybe<RootQueryToUserConnectionWhereArgs>
|
||||
}
|
||||
|
||||
/** The root entry point into the Graph */
|
||||
export type RootQueryVariableProductArgs = {
|
||||
id?: Maybe<Scalars['ID']>
|
||||
idType?: Maybe<ProductIdTypeEnum>
|
||||
}
|
||||
|
||||
/** The root entry point into the Graph */
|
||||
export type RootQueryVisibleProductArgs = {
|
||||
id: Scalars['ID']
|
||||
@ -18271,6 +18282,77 @@ export type WritingSettings = {
|
||||
useSmilies?: Maybe<Scalars['Boolean']>
|
||||
}
|
||||
|
||||
export type GetAllProductsQueryVariables = Exact<{
|
||||
first?: Maybe<Scalars['Int']>
|
||||
}>
|
||||
|
||||
export type GetAllProductsQuery = { __typename?: 'RootQuery' } & {
|
||||
products?: Maybe<
|
||||
{ __typename?: 'RootQueryToProductConnection' } & {
|
||||
pageInfo?: Maybe<
|
||||
{ __typename?: 'WPPageInfo' } & Pick<
|
||||
WpPageInfo,
|
||||
'hasNextPage' | 'hasPreviousPage'
|
||||
>
|
||||
>
|
||||
edges?: Maybe<
|
||||
Array<
|
||||
Maybe<
|
||||
{ __typename?: 'RootQueryToProductConnectionEdge' } & {
|
||||
node?: Maybe<
|
||||
| ({ __typename?: 'ExternalProduct' } & Pick<
|
||||
ExternalProduct,
|
||||
'id' | 'name'
|
||||
> & {
|
||||
image?: Maybe<
|
||||
{ __typename?: 'MediaItem' } & Pick<
|
||||
MediaItem,
|
||||
'uri' | 'altText'
|
||||
>
|
||||
>
|
||||
})
|
||||
| ({ __typename?: 'GroupProduct' } & Pick<
|
||||
GroupProduct,
|
||||
'id' | 'name'
|
||||
> & {
|
||||
image?: Maybe<
|
||||
{ __typename?: 'MediaItem' } & Pick<
|
||||
MediaItem,
|
||||
'uri' | 'altText'
|
||||
>
|
||||
>
|
||||
})
|
||||
| ({ __typename?: 'SimpleProduct' } & Pick<
|
||||
SimpleProduct,
|
||||
'id' | 'name'
|
||||
> & {
|
||||
image?: Maybe<
|
||||
{ __typename?: 'MediaItem' } & Pick<
|
||||
MediaItem,
|
||||
'uri' | 'altText'
|
||||
>
|
||||
>
|
||||
})
|
||||
| ({ __typename?: 'VariableProduct' } & Pick<
|
||||
VariableProduct,
|
||||
'id' | 'name'
|
||||
> & {
|
||||
image?: Maybe<
|
||||
{ __typename?: 'MediaItem' } & Pick<
|
||||
MediaItem,
|
||||
'uri' | 'altText'
|
||||
>
|
||||
>
|
||||
})
|
||||
>
|
||||
}
|
||||
>
|
||||
>
|
||||
>
|
||||
}
|
||||
>
|
||||
}
|
||||
|
||||
export type GetCustomerIdQueryVariables = Exact<{ [key: string]: never }>
|
||||
|
||||
export type GetCustomerIdQuery = { __typename?: 'RootQuery' } & {
|
||||
|
@ -18875,6 +18875,26 @@ interface Product {
|
||||
"""
|
||||
menuOrder: Int
|
||||
|
||||
"""
|
||||
Object meta data
|
||||
"""
|
||||
metaData(
|
||||
"""
|
||||
Retrieve meta by key
|
||||
"""
|
||||
key: String
|
||||
|
||||
"""
|
||||
Retrieve multiple metas by key
|
||||
"""
|
||||
keysIn: [String]
|
||||
|
||||
"""
|
||||
Retrieve meta with matching keys
|
||||
"""
|
||||
multiple: Boolean
|
||||
): [MetaData]
|
||||
|
||||
"""
|
||||
Date product last updated
|
||||
"""
|
||||
@ -24165,31 +24185,6 @@ type Refund implements Node {
|
||||
"""
|
||||
id: ID!
|
||||
|
||||
"""
|
||||
Connection between the Refund type and the LineItem type
|
||||
"""
|
||||
lineItems(
|
||||
"""
|
||||
The number of items to return after the referenced "after" cursor
|
||||
"""
|
||||
first: Int
|
||||
|
||||
"""
|
||||
The number of items to return before the referenced "before" cursor
|
||||
"""
|
||||
last: Int
|
||||
|
||||
"""
|
||||
Cursor used along with the "first" argument to reference where in the dataset to get data
|
||||
"""
|
||||
after: String
|
||||
|
||||
"""
|
||||
Cursor used along with the "last" argument to reference where in the dataset to get data
|
||||
"""
|
||||
before: String
|
||||
): RefundToLineItemConnection
|
||||
|
||||
"""
|
||||
Object meta data
|
||||
"""
|
||||
@ -24241,41 +24236,6 @@ enum RefundIdTypeEnum {
|
||||
ID
|
||||
}
|
||||
|
||||
"""
|
||||
Connection between the Refund type and the LineItem type
|
||||
"""
|
||||
type RefundToLineItemConnection {
|
||||
"""
|
||||
Edges for the RefundToLineItemConnection connection
|
||||
"""
|
||||
edges: [RefundToLineItemConnectionEdge]
|
||||
|
||||
"""
|
||||
The nodes of the connection, without the edges
|
||||
"""
|
||||
nodes: [LineItem]
|
||||
|
||||
"""
|
||||
Information about pagination in a connection.
|
||||
"""
|
||||
pageInfo: WPPageInfo
|
||||
}
|
||||
|
||||
"""
|
||||
An edge in a connection
|
||||
"""
|
||||
type RefundToLineItemConnectionEdge {
|
||||
"""
|
||||
A cursor for use in pagination
|
||||
"""
|
||||
cursor: String
|
||||
|
||||
"""
|
||||
The item at the end of the edge
|
||||
"""
|
||||
node: LineItem
|
||||
}
|
||||
|
||||
"""
|
||||
Input for the registerCustomer mutation
|
||||
"""
|
||||
@ -25827,11 +25787,41 @@ type RootQuery {
|
||||
"""
|
||||
discussionSettings: DiscussionSettings
|
||||
|
||||
"""
|
||||
A simple product object
|
||||
"""
|
||||
externalProduct(
|
||||
"""
|
||||
The ID for identifying the ExternalProduct product
|
||||
"""
|
||||
id: ID
|
||||
|
||||
"""
|
||||
Type of ID being used identify product
|
||||
"""
|
||||
idType: ProductIdTypeEnum
|
||||
): ExternalProduct
|
||||
|
||||
"""
|
||||
Fields of the 'GeneralSettings' settings group
|
||||
"""
|
||||
generalSettings: GeneralSettings
|
||||
|
||||
"""
|
||||
A simple product object
|
||||
"""
|
||||
groupedProduct(
|
||||
"""
|
||||
The ID for identifying the GroupProduct product
|
||||
"""
|
||||
id: ID
|
||||
|
||||
"""
|
||||
Type of ID being used identify product
|
||||
"""
|
||||
idType: ProductIdTypeEnum
|
||||
): GroupProduct
|
||||
|
||||
"""
|
||||
An object of the mediaItem Type.
|
||||
"""
|
||||
@ -26826,6 +26816,21 @@ type RootQuery {
|
||||
before: String
|
||||
): RootQueryToShippingMethodConnection
|
||||
|
||||
"""
|
||||
A simple product object
|
||||
"""
|
||||
simpleProduct(
|
||||
"""
|
||||
The ID for identifying the SimpleProduct product
|
||||
"""
|
||||
id: ID
|
||||
|
||||
"""
|
||||
Type of ID being used identify product
|
||||
"""
|
||||
idType: ProductIdTypeEnum
|
||||
): SimpleProduct
|
||||
|
||||
"""
|
||||
A 0bject
|
||||
"""
|
||||
@ -27121,6 +27126,21 @@ type RootQuery {
|
||||
where: RootQueryToUserConnectionWhereArgs
|
||||
): RootQueryToUserConnection
|
||||
|
||||
"""
|
||||
A simple product object
|
||||
"""
|
||||
variableProduct(
|
||||
"""
|
||||
The ID for identifying the VariableProduct product
|
||||
"""
|
||||
id: ID
|
||||
|
||||
"""
|
||||
Type of ID being used identify product
|
||||
"""
|
||||
idType: ProductIdTypeEnum
|
||||
): VariableProduct
|
||||
|
||||
"""
|
||||
Returns the current user
|
||||
"""
|
||||
|
@ -1,34 +1,22 @@
|
||||
export const productConnectionFragment = /* GraphQL */ `
|
||||
fragment productConnection on ProductConnection {
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
name
|
||||
image {
|
||||
uri
|
||||
altText
|
||||
const getAllProductsQuery = /* GraphQL */ `
|
||||
query getAllProducts($first: Int = 250) {
|
||||
products(first: $first) {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
}
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
name
|
||||
image {
|
||||
uri
|
||||
altText
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
||||
const getAllProductsQuery = /* GraphQL */ `
|
||||
products(first: $first) {
|
||||
pageInfo {
|
||||
hasNextPage
|
||||
hasPreviousPage
|
||||
}
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
name
|
||||
...productConnection
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
${productConnectionFragment}
|
||||
`
|
||||
export default getAllProductsQuery
|
||||
|
Loading…
x
Reference in New Issue
Block a user