Skip to content

Commit

Permalink
feat(core): Expose retry data on Job type in Admin API
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbromley committed Oct 5, 2021
1 parent 9fda858 commit 4b15ef4
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1611,6 +1611,8 @@ export type Job = Node & {
error?: Maybe<Scalars['JSON']>;
isSettled: Scalars['Boolean'];
duration: Scalars['Int'];
retries: Scalars['Int'];
attempts: Scalars['Int'];
};

export type JobFilterParameter = {
Expand All @@ -1622,6 +1624,8 @@ export type JobFilterParameter = {
progress?: Maybe<NumberOperators>;
isSettled?: Maybe<BooleanOperators>;
duration?: Maybe<NumberOperators>;
retries?: Maybe<NumberOperators>;
attempts?: Maybe<NumberOperators>;
};

export type JobList = PaginatedList & {
Expand Down Expand Up @@ -1649,6 +1653,8 @@ export type JobSortParameter = {
queueName?: Maybe<SortOrder>;
progress?: Maybe<SortOrder>;
duration?: Maybe<SortOrder>;
retries?: Maybe<SortOrder>;
attempts?: Maybe<SortOrder>;
};

/**
Expand Down Expand Up @@ -3351,14 +3357,21 @@ export type Product = Node & {
description: Scalars['String'];
featuredAsset?: Maybe<Asset>;
assets: Array<Asset>;
/** Returns all ProductVariants */
variants: Array<ProductVariant>;
/** Returns a paginated, sortable, filterable list of ProductVariants */
variantList: ProductVariantList;
optionGroups: Array<ProductOptionGroup>;
facetValues: Array<FacetValue>;
translations: Array<ProductTranslation>;
collections: Array<Collection>;
customFields?: Maybe<Scalars['JSON']>;
};

export type ProductVariantListArgs = {
options?: Maybe<ProductVariantListOptions>;
};

export type ProductFilterParameter = {
enabled?: Maybe<BooleanOperators>;
createdAt?: Maybe<DateOperators>;
Expand Down
7 changes: 7 additions & 0 deletions packages/common/src/generated-shop-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2303,14 +2303,21 @@ export type Product = Node & {
description: Scalars['String'];
featuredAsset?: Maybe<Asset>;
assets: Array<Asset>;
/** Returns all ProductVariants */
variants: Array<ProductVariant>;
/** Returns a paginated, sortable, filterable list of ProductVariants */
variantList: ProductVariantList;
optionGroups: Array<ProductOptionGroup>;
facetValues: Array<FacetValue>;
translations: Array<ProductTranslation>;
collections: Array<Collection>;
customFields?: Maybe<Scalars['JSON']>;
};

export type ProductVariantListArgs = {
options?: Maybe<ProductVariantListOptions>;
};

export type ProductFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
Expand Down
6 changes: 6 additions & 0 deletions packages/common/src/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,8 @@ export type Job = Node & {
error?: Maybe<Scalars['JSON']>;
isSettled: Scalars['Boolean'];
duration: Scalars['Int'];
retries: Scalars['Int'];
attempts: Scalars['Int'];
};

export type JobFilterParameter = {
Expand All @@ -1665,6 +1667,8 @@ export type JobFilterParameter = {
progress?: Maybe<NumberOperators>;
isSettled?: Maybe<BooleanOperators>;
duration?: Maybe<NumberOperators>;
retries?: Maybe<NumberOperators>;
attempts?: Maybe<NumberOperators>;
};

export type JobList = PaginatedList & {
Expand Down Expand Up @@ -1694,6 +1698,8 @@ export type JobSortParameter = {
queueName?: Maybe<SortOrder>;
progress?: Maybe<SortOrder>;
duration?: Maybe<SortOrder>;
retries?: Maybe<SortOrder>;
attempts?: Maybe<SortOrder>;
};

/**
Expand Down
40 changes: 40 additions & 0 deletions packages/core/e2e/graphql/generated-e2e-admin-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1611,6 +1611,8 @@ export type Job = Node & {
error?: Maybe<Scalars['JSON']>;
isSettled: Scalars['Boolean'];
duration: Scalars['Int'];
retries: Scalars['Int'];
attempts: Scalars['Int'];
};

export type JobFilterParameter = {
Expand All @@ -1622,6 +1624,8 @@ export type JobFilterParameter = {
progress?: Maybe<NumberOperators>;
isSettled?: Maybe<BooleanOperators>;
duration?: Maybe<NumberOperators>;
retries?: Maybe<NumberOperators>;
attempts?: Maybe<NumberOperators>;
};

export type JobList = PaginatedList & {
Expand Down Expand Up @@ -1649,6 +1653,8 @@ export type JobSortParameter = {
queueName?: Maybe<SortOrder>;
progress?: Maybe<SortOrder>;
duration?: Maybe<SortOrder>;
retries?: Maybe<SortOrder>;
attempts?: Maybe<SortOrder>;
};

/**
Expand Down Expand Up @@ -3351,14 +3357,21 @@ export type Product = Node & {
description: Scalars['String'];
featuredAsset?: Maybe<Asset>;
assets: Array<Asset>;
/** Returns all ProductVariants */
variants: Array<ProductVariant>;
/** Returns a paginated, sortable, filterable list of ProductVariants */
variantList: ProductVariantList;
optionGroups: Array<ProductOptionGroup>;
facetValues: Array<FacetValue>;
translations: Array<ProductTranslation>;
collections: Array<Collection>;
customFields?: Maybe<Scalars['JSON']>;
};

export type ProductVariantListArgs = {
options?: Maybe<ProductVariantListOptions>;
};

export type ProductFilterParameter = {
enabled?: Maybe<BooleanOperators>;
createdAt?: Maybe<DateOperators>;
Expand Down Expand Up @@ -6502,6 +6515,19 @@ export type GetProductVariantListQuery = {
};
};

export type GetProductWithVariantListQueryVariables = Exact<{
id?: Maybe<Scalars['ID']>;
variantListOptions?: Maybe<ProductVariantListOptions>;
}>;

export type GetProductWithVariantListQuery = {
product?: Maybe<
Pick<Product, 'id'> & {
variantList: Pick<ProductVariantList, 'totalItems'> & { items: Array<ProductVariantFragment> };
}
>;
};

export type DeletePromotionMutationVariables = Exact<{
id: Scalars['ID'];
}>;
Expand Down Expand Up @@ -8824,6 +8850,20 @@ export namespace GetProductVariantList {
>;
}

export namespace GetProductWithVariantList {
export type Variables = GetProductWithVariantListQueryVariables;
export type Query = GetProductWithVariantListQuery;
export type Product = NonNullable<GetProductWithVariantListQuery['product']>;
export type VariantList = NonNullable<
NonNullable<GetProductWithVariantListQuery['product']>['variantList']
>;
export type Items = NonNullable<
NonNullable<
NonNullable<NonNullable<GetProductWithVariantListQuery['product']>['variantList']>['items']
>[number]
>;
}

export namespace DeletePromotion {
export type Variables = DeletePromotionMutationVariables;
export type Mutation = DeletePromotionMutation;
Expand Down
7 changes: 7 additions & 0 deletions packages/core/e2e/graphql/generated-e2e-shop-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2226,14 +2226,21 @@ export type Product = Node & {
description: Scalars['String'];
featuredAsset?: Maybe<Asset>;
assets: Array<Asset>;
/** Returns all ProductVariants */
variants: Array<ProductVariant>;
/** Returns a paginated, sortable, filterable list of ProductVariants */
variantList: ProductVariantList;
optionGroups: Array<ProductOptionGroup>;
facetValues: Array<FacetValue>;
translations: Array<ProductTranslation>;
collections: Array<Collection>;
customFields?: Maybe<Scalars['JSON']>;
};

export type ProductVariantListArgs = {
options?: Maybe<ProductVariantListOptions>;
};

export type ProductFilterParameter = {
createdAt?: Maybe<DateOperators>;
updatedAt?: Maybe<DateOperators>;
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/api/schema/admin-api/job.api.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ type Job implements Node {
error: JSON
isSettled: Boolean!
duration: Int!
retries: Int!
attempts: Int!
}

type JobQueue {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1611,6 +1611,8 @@ export type Job = Node & {
error?: Maybe<Scalars['JSON']>;
isSettled: Scalars['Boolean'];
duration: Scalars['Int'];
retries: Scalars['Int'];
attempts: Scalars['Int'];
};

export type JobFilterParameter = {
Expand All @@ -1622,6 +1624,8 @@ export type JobFilterParameter = {
progress?: Maybe<NumberOperators>;
isSettled?: Maybe<BooleanOperators>;
duration?: Maybe<NumberOperators>;
retries?: Maybe<NumberOperators>;
attempts?: Maybe<NumberOperators>;
};

export type JobList = PaginatedList & {
Expand Down Expand Up @@ -1649,6 +1653,8 @@ export type JobSortParameter = {
queueName?: Maybe<SortOrder>;
progress?: Maybe<SortOrder>;
duration?: Maybe<SortOrder>;
retries?: Maybe<SortOrder>;
attempts?: Maybe<SortOrder>;
};

/**
Expand Down Expand Up @@ -3351,14 +3357,21 @@ export type Product = Node & {
description: Scalars['String'];
featuredAsset?: Maybe<Asset>;
assets: Array<Asset>;
/** Returns all ProductVariants */
variants: Array<ProductVariant>;
/** Returns a paginated, sortable, filterable list of ProductVariants */
variantList: ProductVariantList;
optionGroups: Array<ProductOptionGroup>;
facetValues: Array<FacetValue>;
translations: Array<ProductTranslation>;
collections: Array<Collection>;
customFields?: Maybe<Scalars['JSON']>;
};

export type ProductVariantListArgs = {
options?: Maybe<ProductVariantListOptions>;
};

export type ProductFilterParameter = {
enabled?: Maybe<BooleanOperators>;
createdAt?: Maybe<DateOperators>;
Expand Down
2 changes: 1 addition & 1 deletion schema-admin.json

Large diffs are not rendered by default.

0 comments on commit 4b15ef4

Please sign in to comment.