Skip to content

Commit

Permalink
feat(core): Allow PaginatedList queries to filter on ID fields
Browse files Browse the repository at this point in the history
Closes #1259
  • Loading branch information
michaelbromley committed Dec 8, 2021
1 parent 1d93db8 commit fa3d5ed
Show file tree
Hide file tree
Showing 15 changed files with 3,893 additions and 3,399 deletions.
31 changes: 31 additions & 0 deletions packages/admin-ui/src/lib/core/src/common/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export type Administrator = Node & {
};

export type AdministratorFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
firstName?: Maybe<StringOperators>;
Expand Down Expand Up @@ -173,6 +174,7 @@ export type Asset = Node & {
};

export type AssetFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
name?: Maybe<StringOperators>;
Expand Down Expand Up @@ -274,6 +276,7 @@ export type BooleanCustomFieldConfig = CustomField & {
ui?: Maybe<Scalars['JSON']>;
};

/** Operators for filtering on a Boolean field */
export type BooleanOperators = {
eq?: Maybe<Scalars['Boolean']>;
};
Expand Down Expand Up @@ -370,6 +373,7 @@ export type CollectionBreadcrumb = {

export type CollectionFilterParameter = {
isPrivate?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -496,6 +500,7 @@ export type Country = Node & {
};

export type CountryFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -1196,6 +1201,7 @@ export type CustomerOrdersArgs = {
};

export type CustomerFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
title?: Maybe<StringOperators>;
Expand All @@ -1221,6 +1227,7 @@ export type CustomerGroupCustomersArgs = {
};

export type CustomerGroupFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
name?: Maybe<StringOperators>;
Expand Down Expand Up @@ -1282,6 +1289,7 @@ export type CustomerSortParameter = {
emailAddress?: Maybe<SortOrder>;
};

/** Operators for filtering on a DateTime field */
export type DateOperators = {
eq?: Maybe<Scalars['DateTime']>;
before?: Maybe<Scalars['DateTime']>;
Expand Down Expand Up @@ -1421,6 +1429,7 @@ export type Facet = Node & {

export type FacetFilterParameter = {
isPrivate?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -1598,6 +1607,7 @@ export type HistoryEntry = Node & {

export type HistoryEntryFilterParameter = {
isPublic?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
type?: Maybe<StringOperators>;
Expand Down Expand Up @@ -1655,6 +1665,14 @@ export enum HistoryEntryType {
ORDER_MODIFIED = 'ORDER_MODIFIED'
}

/** Operators for filtering on an ID field */
export type IdOperators = {
eq?: Maybe<Scalars['String']>;
notEq?: Maybe<Scalars['String']>;
in?: Maybe<Array<Scalars['String']>>;
notIn?: Maybe<Array<Scalars['String']>>;
};

export type ImportInfo = {
__typename?: 'ImportInfo';
errors?: Maybe<Array<Scalars['String']>>;
Expand Down Expand Up @@ -1748,6 +1766,7 @@ export type JobBufferSize = {
};

export type JobFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
startedAt?: Maybe<DateOperators>;
settledAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -3082,6 +3101,7 @@ export type NothingToRefundError = ErrorResult & {
message: Scalars['String'];
};

/** Operators for filtering on a Int or Float field */
export type NumberOperators = {
eq?: Maybe<Scalars['Float']>;
lt?: Maybe<Scalars['Float']>;
Expand Down Expand Up @@ -3177,6 +3197,7 @@ export type OrderAddress = {

export type OrderFilterParameter = {
customerLastName?: Maybe<StringOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
orderPlacedAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -3428,6 +3449,7 @@ export type PaymentMethod = Node & {
};

export type PaymentMethodFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
name?: Maybe<StringOperators>;
Expand Down Expand Up @@ -3728,6 +3750,7 @@ export type ProductVariantListArgs = {

export type ProductFilterParameter = {
enabled?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -3895,6 +3918,8 @@ export type ProductVariantFilterParameter = {
stockAllocated?: Maybe<NumberOperators>;
outOfStockThreshold?: Maybe<NumberOperators>;
useGlobalOutOfStockThreshold?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
productId?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -3973,6 +3998,7 @@ export type Promotion = Node & {
};

export type PromotionFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
startsAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -4440,6 +4466,7 @@ export type Role = Node & {
};

export type RoleFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
code?: Maybe<StringOperators>;
Expand Down Expand Up @@ -4601,6 +4628,7 @@ export type ShippingMethod = Node & {
};

export type ShippingMethodFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
code?: Maybe<StringOperators>;
Expand Down Expand Up @@ -4744,6 +4772,7 @@ export type StringFieldOption = {
label?: Maybe<Array<LocalizedString>>;
};

/** Operators for filtering on a String field */
export type StringOperators = {
eq?: Maybe<Scalars['String']>;
notEq?: Maybe<Scalars['String']>;
Expand Down Expand Up @@ -4791,6 +4820,7 @@ export type Tag = Node & {
};

export type TagFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
value?: Maybe<StringOperators>;
Expand Down Expand Up @@ -4853,6 +4883,7 @@ export type TaxRate = Node & {
};

export type TaxRateFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
name?: Maybe<StringOperators>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ export type Administrator = Node & {
};

export type AdministratorFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
firstName?: Maybe<StringOperators>;
Expand Down Expand Up @@ -165,6 +166,7 @@ export type Asset = Node & {
};

export type AssetFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
name?: Maybe<StringOperators>;
Expand Down Expand Up @@ -263,6 +265,7 @@ export type BooleanCustomFieldConfig = CustomField & {
ui?: Maybe<Scalars['JSON']>;
};

/** Operators for filtering on a Boolean field */
export type BooleanOperators = {
eq?: Maybe<Scalars['Boolean']>;
};
Expand Down Expand Up @@ -353,6 +356,7 @@ export type CollectionBreadcrumb = {

export type CollectionFilterParameter = {
isPrivate?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -470,6 +474,7 @@ export type Country = Node & {
};

export type CountryFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -1156,6 +1161,7 @@ export type CustomerOrdersArgs = {
};

export type CustomerFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
title?: Maybe<StringOperators>;
Expand All @@ -1180,6 +1186,7 @@ export type CustomerGroupCustomersArgs = {
};

export type CustomerGroupFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
name?: Maybe<StringOperators>;
Expand Down Expand Up @@ -1239,6 +1246,7 @@ export type CustomerSortParameter = {
emailAddress?: Maybe<SortOrder>;
};

/** Operators for filtering on a DateTime field */
export type DateOperators = {
eq?: Maybe<Scalars['DateTime']>;
before?: Maybe<Scalars['DateTime']>;
Expand Down Expand Up @@ -1372,6 +1380,7 @@ export type Facet = Node & {

export type FacetFilterParameter = {
isPrivate?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -1539,6 +1548,7 @@ export type HistoryEntry = Node & {

export type HistoryEntryFilterParameter = {
isPublic?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
type?: Maybe<StringOperators>;
Expand Down Expand Up @@ -1595,6 +1605,14 @@ export enum HistoryEntryType {
ORDER_MODIFIED = 'ORDER_MODIFIED'
}

/** Operators for filtering on an ID field */
export type IdOperators = {
eq?: Maybe<Scalars['String']>;
notEq?: Maybe<Scalars['String']>;
in?: Maybe<Array<Scalars['String']>>;
notIn?: Maybe<Array<Scalars['String']>>;
};

export type ImportInfo = {
errors?: Maybe<Array<Scalars['String']>>;
processed: Scalars['Int'];
Expand Down Expand Up @@ -1679,6 +1697,7 @@ export type JobBufferSize = {
};

export type JobFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
startedAt?: Maybe<DateOperators>;
settledAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -2943,6 +2962,7 @@ export type NothingToRefundError = ErrorResult & {
message: Scalars['String'];
};

/** Operators for filtering on a Int or Float field */
export type NumberOperators = {
eq?: Maybe<Scalars['Float']>;
lt?: Maybe<Scalars['Float']>;
Expand Down Expand Up @@ -3036,6 +3056,7 @@ export type OrderAddress = {

export type OrderFilterParameter = {
customerLastName?: Maybe<StringOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
orderPlacedAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -3276,6 +3297,7 @@ export type PaymentMethod = Node & {
};

export type PaymentMethodFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
name?: Maybe<StringOperators>;
Expand Down Expand Up @@ -3567,6 +3589,7 @@ export type ProductVariantListArgs = {

export type ProductFilterParameter = {
enabled?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -3726,6 +3749,8 @@ export type ProductVariantFilterParameter = {
stockAllocated?: Maybe<NumberOperators>;
outOfStockThreshold?: Maybe<NumberOperators>;
useGlobalOutOfStockThreshold?: Maybe<BooleanOperators>;
id?: Maybe<IdOperators>;
productId?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
languageCode?: Maybe<StringOperators>;
Expand Down Expand Up @@ -3801,6 +3826,7 @@ export type Promotion = Node & {
};

export type PromotionFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
startsAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -4254,6 +4280,7 @@ export type Role = Node & {
};

export type RoleFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
code?: Maybe<StringOperators>;
Expand Down Expand Up @@ -4405,6 +4432,7 @@ export type ShippingMethod = Node & {
};

export type ShippingMethodFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
code?: Maybe<StringOperators>;
Expand Down Expand Up @@ -4540,6 +4568,7 @@ export type StringFieldOption = {
label?: Maybe<Array<LocalizedString>>;
};

/** Operators for filtering on a String field */
export type StringOperators = {
eq?: Maybe<Scalars['String']>;
notEq?: Maybe<Scalars['String']>;
Expand Down Expand Up @@ -4584,6 +4613,7 @@ export type Tag = Node & {
};

export type TagFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
value?: Maybe<StringOperators>;
Expand Down Expand Up @@ -4642,6 +4672,7 @@ export type TaxRate = Node & {
};

export type TaxRateFilterParameter = {
id?: Maybe<IdOperators>;
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
name?: Maybe<StringOperators>;
Expand Down
Loading

0 comments on commit fa3d5ed

Please sign in to comment.