Skip to content

Commit

Permalink
feat(core): Allow PaginatedList filters to use logical OR operator
Browse files Browse the repository at this point in the history
Closes #1149
  • Loading branch information
michaelbromley committed Oct 12, 2021
1 parent 75130cd commit e371aa5
Show file tree
Hide file tree
Showing 13 changed files with 674 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,16 @@ export type AdministratorList = PaginatedList & {
};

export type AdministratorListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<AdministratorSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<AdministratorFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type AdministratorPaymentInput = {
Expand Down Expand Up @@ -187,10 +193,16 @@ export type AssetList = PaginatedList & {
export type AssetListOptions = {
tags?: Maybe<Array<Scalars['String']>>;
tagsOperator?: Maybe<LogicalOperator>;
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<AssetSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<AssetFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type AssetSortParameter = {
Expand Down Expand Up @@ -369,10 +381,16 @@ export type CollectionList = PaginatedList & {
};

export type CollectionListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<CollectionSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<CollectionFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

/**
Expand Down Expand Up @@ -478,10 +496,16 @@ export type CountryList = PaginatedList & {
};

export type CountryListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<CountrySortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<CountryFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type CountrySortParameter = {
Expand Down Expand Up @@ -1167,10 +1191,16 @@ export type CustomerGroupList = PaginatedList & {
};

export type CustomerGroupListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<CustomerGroupSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<CustomerGroupFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type CustomerGroupSortParameter = {
Expand All @@ -1186,10 +1216,16 @@ export type CustomerList = PaginatedList & {
};

export type CustomerListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<CustomerSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<CustomerFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type CustomerSortParameter = {
Expand Down Expand Up @@ -1347,10 +1383,16 @@ export type FacetList = PaginatedList & {
};

export type FacetListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<FacetSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<FacetFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type FacetSortParameter = {
Expand Down Expand Up @@ -1505,10 +1547,16 @@ export type HistoryEntryList = PaginatedList & {
};

export type HistoryEntryListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<HistoryEntrySortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<HistoryEntryFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type HistoryEntrySortParameter = {
Expand Down Expand Up @@ -1644,10 +1692,16 @@ export type JobList = PaginatedList & {
};

export type JobListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<JobSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<JobFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type JobQueue = {
Expand Down Expand Up @@ -3005,10 +3059,16 @@ export type OrderList = PaginatedList & {
};

export type OrderListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<OrderSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<OrderFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type OrderModification = Node & {
Expand Down Expand Up @@ -3122,10 +3182,16 @@ export type PaymentMethodList = PaginatedList & {
};

export type PaymentMethodListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<PaymentMethodSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<PaymentMethodFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

/**
Expand Down Expand Up @@ -3405,10 +3471,16 @@ export type ProductList = PaginatedList & {
};

export type ProductListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<ProductSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<ProductFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type ProductOption = Node & {
Expand Down Expand Up @@ -3560,10 +3632,16 @@ export type ProductVariantList = PaginatedList & {
};

export type ProductVariantListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<ProductVariantSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<ProductVariantFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type ProductVariantSortParameter = {
Expand Down Expand Up @@ -3627,10 +3705,16 @@ export type PromotionList = PaginatedList & {
};

export type PromotionListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<PromotionSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<PromotionFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type PromotionSortParameter = {
Expand Down Expand Up @@ -4036,10 +4120,16 @@ export type RoleList = PaginatedList & {
};

export type RoleListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<RoleSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<RoleFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type RoleSortParameter = {
Expand Down Expand Up @@ -4188,10 +4278,16 @@ export type ShippingMethodList = PaginatedList & {
};

export type ShippingMethodListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<ShippingMethodSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<ShippingMethodFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type ShippingMethodQuote = {
Expand Down Expand Up @@ -4357,10 +4453,16 @@ export type TagList = PaginatedList & {
};

export type TagListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<TagSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<TagFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type TagSortParameter = {
Expand Down Expand Up @@ -4409,10 +4511,16 @@ export type TaxRateList = PaginatedList & {
};

export type TaxRateListOptions = {
/** Skips the first n results, for use in pagination */
skip?: Maybe<Scalars['Int']>;
/** Takes n results, for use in pagination */
take?: Maybe<Scalars['Int']>;
/** Specifies which properties to sort the results by */
sort?: Maybe<TaxRateSortParameter>;
/** Allows the results to be filtered */
filter?: Maybe<TaxRateFilterParameter>;
/** Specifies whether multiple "filter" arguments should be combines with a logical AND or OR operation. Defaults to AND. */
filterOperator?: Maybe<LogicalOperator>;
};

export type TaxRateSortParameter = {
Expand Down
Loading

0 comments on commit e371aa5

Please sign in to comment.