Skip to content

Commit

Permalink
fix(admin-ui): Remove references to obsolete languageCode arguments
Browse files Browse the repository at this point in the history
Relates to #128
  • Loading branch information
michaelbromley committed Jul 19, 2019
1 parent 2035003 commit 1e81068
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 87 deletions.
81 changes: 33 additions & 48 deletions admin-ui/src/app/common/generated-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export type Channel = Node & {

export type Collection = Node & {
__typename?: 'Collection',
isPrivate: Scalars['Boolean'],
id: Scalars['ID'],
createdAt: Scalars['DateTime'],
updatedAt: Scalars['DateTime'],
Expand All @@ -221,7 +222,6 @@ export type Collection = Node & {
filters: Array<ConfigurableOperation>,
translations: Array<CollectionTranslation>,
productVariants: ProductVariantList,
isPrivate: Scalars['Boolean'],
customFields?: Maybe<Scalars['JSON']>,
};

Expand All @@ -237,13 +237,13 @@ export type CollectionBreadcrumb = {
};

export type CollectionFilterParameter = {
isPrivate?: Maybe<BooleanOperators>,
createdAt?: Maybe<DateOperators>,
updatedAt?: Maybe<DateOperators>,
languageCode?: Maybe<StringOperators>,
name?: Maybe<StringOperators>,
position?: Maybe<NumberOperators>,
description?: Maybe<StringOperators>,
isPrivate?: Maybe<BooleanOperators>,
};

export type CollectionList = PaginatedList & {
Expand Down Expand Up @@ -1009,6 +1009,7 @@ export enum DeletionResult {

export type Facet = Node & {
__typename?: 'Facet',
isPrivate: Scalars['Boolean'],
id: Scalars['ID'],
createdAt: Scalars['DateTime'],
updatedAt: Scalars['DateTime'],
Expand All @@ -1017,17 +1018,16 @@ export type Facet = Node & {
code: Scalars['String'],
values: Array<FacetValue>,
translations: Array<FacetTranslation>,
isPrivate: Scalars['Boolean'],
customFields?: Maybe<Scalars['JSON']>,
};

export type FacetFilterParameter = {
isPrivate?: Maybe<BooleanOperators>,
createdAt?: Maybe<DateOperators>,
updatedAt?: Maybe<DateOperators>,
languageCode?: Maybe<StringOperators>,
name?: Maybe<StringOperators>,
code?: Maybe<StringOperators>,
isPrivate?: Maybe<BooleanOperators>,
};

export type FacetList = PaginatedList & {
Expand Down Expand Up @@ -1700,7 +1700,6 @@ export type Mutation = {
addNoteToOrder: Order,
/** Update an existing PaymentMethod */
updatePaymentMethod: PaymentMethod,
reindex: JobInfo,
/** Create a new ProductOptionGroup */
createProductOptionGroup: ProductOptionGroup,
/** Update an existing ProductOptionGroup */
Expand All @@ -1709,6 +1708,7 @@ export type Mutation = {
createProductOption: ProductOption,
/** Create a new ProductOption within a ProductOptionGroup */
updateProductOption: ProductOption,
reindex: JobInfo,
/** Create a new Product */
createProduct: Product,
/** Update an existing Product */
Expand Down Expand Up @@ -2365,6 +2365,7 @@ export type PriceRange = {

export type Product = Node & {
__typename?: 'Product',
enabled: Scalars['Boolean'],
id: Scalars['ID'],
createdAt: Scalars['DateTime'],
updatedAt: Scalars['DateTime'],
Expand All @@ -2379,18 +2380,17 @@ export type Product = Node & {
facetValues: Array<FacetValue>,
translations: Array<ProductTranslation>,
collections: Array<Collection>,
enabled: Scalars['Boolean'],
customFields?: Maybe<Scalars['JSON']>,
};

export type ProductFilterParameter = {
enabled?: Maybe<BooleanOperators>,
createdAt?: Maybe<DateOperators>,
updatedAt?: Maybe<DateOperators>,
languageCode?: Maybe<StringOperators>,
name?: Maybe<StringOperators>,
slug?: Maybe<StringOperators>,
description?: Maybe<StringOperators>,
enabled?: Maybe<BooleanOperators>,
};

export type ProductList = PaginatedList & {
Expand Down Expand Up @@ -2495,6 +2495,10 @@ export type ProductTranslationInput = {

export type ProductVariant = Node & {
__typename?: 'ProductVariant',
enabled: Scalars['Boolean'],
stockOnHand: Scalars['Int'],
trackInventory: Scalars['Boolean'],
stockMovements: StockMovementList,
id: Scalars['ID'],
productId: Scalars['ID'],
createdAt: Scalars['DateTime'],
Expand All @@ -2513,10 +2517,6 @@ export type ProductVariant = Node & {
options: Array<ProductOption>,
facetValues: Array<FacetValue>,
translations: Array<ProductVariantTranslation>,
enabled: Scalars['Boolean'],
stockOnHand: Scalars['Int'],
trackInventory: Scalars['Boolean'],
stockMovements: StockMovementList,
customFields?: Maybe<Scalars['JSON']>,
};

Expand All @@ -2526,6 +2526,9 @@ export type ProductVariantStockMovementsArgs = {
};

export type ProductVariantFilterParameter = {
enabled?: Maybe<BooleanOperators>,
stockOnHand?: Maybe<NumberOperators>,
trackInventory?: Maybe<BooleanOperators>,
createdAt?: Maybe<DateOperators>,
updatedAt?: Maybe<DateOperators>,
languageCode?: Maybe<StringOperators>,
Expand All @@ -2535,9 +2538,6 @@ export type ProductVariantFilterParameter = {
currencyCode?: Maybe<StringOperators>,
priceIncludesTax?: Maybe<BooleanOperators>,
priceWithTax?: Maybe<NumberOperators>,
enabled?: Maybe<BooleanOperators>,
stockOnHand?: Maybe<NumberOperators>,
trackInventory?: Maybe<BooleanOperators>,
};

export type ProductVariantList = PaginatedList & {
Expand All @@ -2554,6 +2554,7 @@ export type ProductVariantListOptions = {
};

export type ProductVariantSortParameter = {
stockOnHand?: Maybe<SortOrder>,
id?: Maybe<SortOrder>,
productId?: Maybe<SortOrder>,
createdAt?: Maybe<SortOrder>,
Expand All @@ -2562,7 +2563,6 @@ export type ProductVariantSortParameter = {
name?: Maybe<SortOrder>,
price?: Maybe<SortOrder>,
priceWithTax?: Maybe<SortOrder>,
stockOnHand?: Maybe<SortOrder>,
};

export type ProductVariantTranslation = {
Expand Down Expand Up @@ -2647,9 +2647,9 @@ export type Query = {
orders: OrderList,
paymentMethods: PaymentMethodList,
paymentMethod?: Maybe<PaymentMethod>,
search: SearchResponse,
productOptionGroups: Array<ProductOptionGroup>,
productOptionGroup?: Maybe<ProductOptionGroup>,
search: SearchResponse,
products: ProductList,
/** Get a Product either by id or slug. If neither id nor slug is speicified, an error will result. */
product?: Maybe<Product>,
Expand Down Expand Up @@ -2700,14 +2700,12 @@ export type QueryChannelArgs = {


export type QueryCollectionsArgs = {
languageCode?: Maybe<LanguageCode>,
options?: Maybe<CollectionListOptions>
};


export type QueryCollectionArgs = {
id: Scalars['ID'],
languageCode?: Maybe<LanguageCode>
id: Scalars['ID']
};


Expand Down Expand Up @@ -2737,14 +2735,12 @@ export type QueryCustomerArgs = {


export type QueryFacetsArgs = {
languageCode?: Maybe<LanguageCode>,
options?: Maybe<FacetListOptions>
};


export type QueryFacetArgs = {
id: Scalars['ID'],
languageCode?: Maybe<LanguageCode>
id: Scalars['ID']
};


Expand Down Expand Up @@ -2778,33 +2774,29 @@ export type QueryPaymentMethodArgs = {
};


export type QuerySearchArgs = {
input: SearchInput
};


export type QueryProductOptionGroupsArgs = {
languageCode?: Maybe<LanguageCode>,
filterTerm?: Maybe<Scalars['String']>
};


export type QueryProductOptionGroupArgs = {
id: Scalars['ID'],
languageCode?: Maybe<LanguageCode>
id: Scalars['ID']
};


export type QuerySearchArgs = {
input: SearchInput
};


export type QueryProductsArgs = {
languageCode?: Maybe<LanguageCode>,
options?: Maybe<ProductListOptions>
};


export type QueryProductArgs = {
id?: Maybe<Scalars['ID']>,
slug?: Maybe<Scalars['String']>,
languageCode?: Maybe<LanguageCode>
slug?: Maybe<Scalars['String']>
};


Expand Down Expand Up @@ -2970,6 +2962,7 @@ export type SearchResponse = {

export type SearchResult = {
__typename?: 'SearchResult',
enabled: Scalars['Boolean'],
sku: Scalars['String'],
slug: Scalars['String'],
productId: Scalars['ID'],
Expand All @@ -2988,7 +2981,6 @@ export type SearchResult = {
collectionIds: Array<Scalars['String']>,
/** A relevence score for the result. Differs between database implementations */
score: Scalars['Float'],
enabled: Scalars['Boolean'],
};

/** The price of a search result product, either as a range or as a single price */
Expand Down Expand Up @@ -3533,16 +3525,14 @@ export type GetCollectionFiltersQuery = ({ __typename?: 'Query' } & { collection
export type CollectionFragment = ({ __typename?: 'Collection' } & Pick<Collection, 'id' | 'name' | 'description' | 'isPrivate' | 'languageCode'> & { featuredAsset: Maybe<({ __typename?: 'Asset' } & AssetFragment)>, assets: Array<({ __typename?: 'Asset' } & AssetFragment)>, filters: Array<({ __typename?: 'ConfigurableOperation' } & ConfigurableOperationFragment)>, translations: Array<({ __typename?: 'CollectionTranslation' } & Pick<CollectionTranslation, 'id' | 'languageCode' | 'name' | 'description'>)>, parent: Maybe<({ __typename?: 'Collection' } & Pick<Collection, 'id' | 'name'>)>, children: Maybe<Array<({ __typename?: 'Collection' } & Pick<Collection, 'id' | 'name'>)>> });

export type GetCollectionListQueryVariables = {
options?: Maybe<CollectionListOptions>,
languageCode?: Maybe<LanguageCode>
options?: Maybe<CollectionListOptions>
};


export type GetCollectionListQuery = ({ __typename?: 'Query' } & { collections: ({ __typename?: 'CollectionList' } & Pick<CollectionList, 'totalItems'> & { items: Array<({ __typename?: 'Collection' } & Pick<Collection, 'id' | 'name' | 'description' | 'isPrivate'> & { featuredAsset: Maybe<({ __typename?: 'Asset' } & AssetFragment)>, parent: Maybe<({ __typename?: 'Collection' } & Pick<Collection, 'id'>)> })> }) });

export type GetCollectionQueryVariables = {
id: Scalars['ID'],
languageCode?: Maybe<LanguageCode>
id: Scalars['ID']
};


Expand Down Expand Up @@ -3682,16 +3672,14 @@ export type DeleteFacetValuesMutationVariables = {
export type DeleteFacetValuesMutation = ({ __typename?: 'Mutation' } & { deleteFacetValues: Array<({ __typename?: 'DeletionResponse' } & Pick<DeletionResponse, 'result' | 'message'>)> });

export type GetFacetListQueryVariables = {
options?: Maybe<FacetListOptions>,
languageCode?: Maybe<LanguageCode>
options?: Maybe<FacetListOptions>
};


export type GetFacetListQuery = ({ __typename?: 'Query' } & { facets: ({ __typename?: 'FacetList' } & Pick<FacetList, 'totalItems'> & { items: Array<({ __typename?: 'Facet' } & FacetWithValuesFragment)> }) });

export type GetFacetWithValuesQueryVariables = {
id: Scalars['ID'],
languageCode?: Maybe<LanguageCode>
id: Scalars['ID']
};


Expand Down Expand Up @@ -3840,24 +3828,21 @@ export type RemoveOptionGroupFromProductMutationVariables = {
export type RemoveOptionGroupFromProductMutation = ({ __typename?: 'Mutation' } & { removeOptionGroupFromProduct: ({ __typename?: 'Product' } & Pick<Product, 'id'> & { optionGroups: Array<({ __typename?: 'ProductOptionGroup' } & Pick<ProductOptionGroup, 'id' | 'code'> & { options: Array<({ __typename?: 'ProductOption' } & Pick<ProductOption, 'id' | 'code'>)> })> }) });

export type GetProductWithVariantsQueryVariables = {
id: Scalars['ID'],
languageCode?: Maybe<LanguageCode>
id: Scalars['ID']
};


export type GetProductWithVariantsQuery = ({ __typename?: 'Query' } & { product: Maybe<({ __typename?: 'Product' } & ProductWithVariantsFragment)> });

export type GetProductListQueryVariables = {
options?: Maybe<ProductListOptions>,
languageCode?: Maybe<LanguageCode>
options?: Maybe<ProductListOptions>
};


export type GetProductListQuery = ({ __typename?: 'Query' } & { products: ({ __typename?: 'ProductList' } & Pick<ProductList, 'totalItems'> & { items: Array<({ __typename?: 'Product' } & Pick<Product, 'id' | 'enabled' | 'languageCode' | 'name' | 'slug'> & { featuredAsset: Maybe<({ __typename?: 'Asset' } & Pick<Asset, 'id' | 'preview'>)> })> }) });

export type GetProductOptionGroupsQueryVariables = {
filterTerm?: Maybe<Scalars['String']>,
languageCode?: Maybe<LanguageCode>
filterTerm?: Maybe<Scalars['String']>
};


Expand Down
36 changes: 18 additions & 18 deletions admin-ui/src/app/common/introspection-result.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,6 @@ const result: IntrospectionResultData = {
{
name: 'ProductVariant',
},
{
name: 'TaxRate',
},
{
name: 'TaxCategory',
},
{
name: 'CustomerGroup',
},
{
name: 'ProductOption',
},
{
name: 'FacetValue',
},
{
name: 'Facet',
},
{
name: 'StockAdjustment',
},
Expand Down Expand Up @@ -155,6 +137,24 @@ const result: IntrospectionResultData = {
{
name: 'Return',
},
{
name: 'TaxRate',
},
{
name: 'TaxCategory',
},
{
name: 'CustomerGroup',
},
{
name: 'ProductOption',
},
{
name: 'FacetValue',
},
{
name: 'Facet',
},
{
name: 'PaymentMethod',
},
Expand Down
8 changes: 4 additions & 4 deletions admin-ui/src/app/data/definitions/collection-definitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export const COLLECTION_FRAGMENT = gql`
`;

export const GET_COLLECTION_LIST = gql`
query GetCollectionList($options: CollectionListOptions, $languageCode: LanguageCode) {
collections(languageCode: $languageCode, options: $options) {
query GetCollectionList($options: CollectionListOptions) {
collections(options: $options) {
items {
id
name
Expand All @@ -69,8 +69,8 @@ export const GET_COLLECTION_LIST = gql`
`;

export const GET_COLLECTION = gql`
query GetCollection($id: ID!, $languageCode: LanguageCode) {
collection(id: $id, languageCode: $languageCode) {
query GetCollection($id: ID!) {
collection(id: $id) {
...Collection
}
}
Expand Down
Loading

0 comments on commit 1e81068

Please sign in to comment.