Skip to content

Commit

Permalink
fix generated types
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardlyhel committed Dec 4, 2024
1 parent b36ea1f commit bbc91c8
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 493 deletions.
124 changes: 1 addition & 123 deletions examples/custom-cart-method/storefrontapi.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -807,32 +807,6 @@ export type ProductFragment = Pick<
>;
}
>;
variants: {
nodes: Array<
Pick<
StorefrontAPI.ProductVariant,
'availableForSale' | 'id' | 'sku' | 'title'
> & {
compareAtPrice?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
>;
image?: StorefrontAPI.Maybe<
{__typename: 'Image'} & Pick<
StorefrontAPI.Image,
'id' | 'url' | 'altText' | 'width' | 'height'
>
>;
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
unitPrice?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
>;
}
>;
};
seo: Pick<StorefrontAPI.Seo, 'description' | 'title'>;
};

Expand Down Expand Up @@ -947,103 +921,11 @@ export type ProductQuery = {
>;
}
>;
variants: {
nodes: Array<
Pick<
StorefrontAPI.ProductVariant,
'availableForSale' | 'id' | 'sku' | 'title'
> & {
compareAtPrice?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
>;
image?: StorefrontAPI.Maybe<
{__typename: 'Image'} & Pick<
StorefrontAPI.Image,
'id' | 'url' | 'altText' | 'width' | 'height'
>
>;
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
unitPrice?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
>;
}
>;
};
seo: Pick<StorefrontAPI.Seo, 'description' | 'title'>;
}
>;
};

export type ProductVariantsFragment = {
variants: {
nodes: Array<
Pick<
StorefrontAPI.ProductVariant,
'availableForSale' | 'id' | 'sku' | 'title'
> & {
compareAtPrice?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
>;
image?: StorefrontAPI.Maybe<
{__typename: 'Image'} & Pick<
StorefrontAPI.Image,
'id' | 'url' | 'altText' | 'width' | 'height'
>
>;
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
unitPrice?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
>;
}
>;
};
};

export type ProductVariantsQueryVariables = StorefrontAPI.Exact<{
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
handle: StorefrontAPI.Scalars['String']['input'];
}>;

export type ProductVariantsQuery = {
product?: StorefrontAPI.Maybe<{
variants: {
nodes: Array<
Pick<
StorefrontAPI.ProductVariant,
'availableForSale' | 'id' | 'sku' | 'title'
> & {
compareAtPrice?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
>;
image?: StorefrontAPI.Maybe<
{__typename: 'Image'} & Pick<
StorefrontAPI.Image,
'id' | 'url' | 'altText' | 'width' | 'height'
>
>;
price: Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>;
product: Pick<StorefrontAPI.Product, 'title' | 'handle'>;
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
unitPrice?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.MoneyV2, 'amount' | 'currencyCode'>
>;
}
>;
};
}>;
};

export type SearchProductFragment = {__typename: 'Product'} & Pick<
StorefrontAPI.Product,
'handle' | 'id' | 'publishedAt' | 'title' | 'trackingParameters' | 'vendor'
Expand Down Expand Up @@ -1331,14 +1213,10 @@ interface GeneratedQueryTypes {
return: PoliciesQuery;
variables: PoliciesQueryVariables;
};
'#graphql\n query Product(\n $country: CountryCode\n $handle: String!\n $language: LanguageCode\n $selectedOptions: [SelectedOptionInput!]!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...Product\n }\n }\n #graphql\n fragment Product on Product {\n id\n title\n vendor\n handle\n descriptionHtml\n description\n encodedVariantExistence\n encodedVariantAvailability\n options {\n name\n optionValues {\n name\n firstSelectableVariant {\n ...ProductVariant\n }\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n }\n }\n selectedOrFirstAvailableVariant(selectedOptions: $selectedOptions, ignoreUnknownOptions: true, caseInsensitiveMatch: true) {\n ...ProductVariant\n }\n adjacentVariants (selectedOptions: $selectedOptions) {\n ...ProductVariant\n }\n variants(first: 1) {\n nodes {\n ...ProductVariant\n }\n }\n seo {\n description\n title\n }\n }\n #graphql\n fragment ProductVariant on ProductVariant {\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n id\n image {\n __typename\n id\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n product {\n title\n handle\n }\n selectedOptions {\n name\n value\n }\n sku\n title\n unitPrice {\n amount\n currencyCode\n }\n }\n\n\n': {
'#graphql\n query Product(\n $country: CountryCode\n $handle: String!\n $language: LanguageCode\n $selectedOptions: [SelectedOptionInput!]!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...Product\n }\n }\n #graphql\n fragment Product on Product {\n id\n title\n vendor\n handle\n descriptionHtml\n description\n encodedVariantExistence\n encodedVariantAvailability\n options {\n name\n optionValues {\n name\n firstSelectableVariant {\n ...ProductVariant\n }\n swatch {\n color\n image {\n previewImage {\n url\n }\n }\n }\n }\n }\n selectedOrFirstAvailableVariant(selectedOptions: $selectedOptions, ignoreUnknownOptions: true, caseInsensitiveMatch: true) {\n ...ProductVariant\n }\n adjacentVariants (selectedOptions: $selectedOptions) {\n ...ProductVariant\n }\n seo {\n description\n title\n }\n }\n #graphql\n fragment ProductVariant on ProductVariant {\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n id\n image {\n __typename\n id\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n product {\n title\n handle\n }\n selectedOptions {\n name\n value\n }\n sku\n title\n unitPrice {\n amount\n currencyCode\n }\n }\n\n\n': {
return: ProductQuery;
variables: ProductQueryVariables;
};
'#graphql\n #graphql\n fragment ProductVariants on Product {\n variants(first: 250) {\n nodes {\n ...ProductVariant\n }\n }\n }\n #graphql\n fragment ProductVariant on ProductVariant {\n availableForSale\n compareAtPrice {\n amount\n currencyCode\n }\n id\n image {\n __typename\n id\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n product {\n title\n handle\n }\n selectedOptions {\n name\n value\n }\n sku\n title\n unitPrice {\n amount\n currencyCode\n }\n }\n\n\n query ProductVariants(\n $country: CountryCode\n $language: LanguageCode\n $handle: String!\n ) @inContext(country: $country, language: $language) {\n product(handle: $handle) {\n ...ProductVariants\n }\n }\n': {
return: ProductVariantsQuery;
variables: ProductVariantsQueryVariables;
};
'#graphql\n query RegularSearch(\n $country: CountryCode\n $endCursor: String\n $first: Int\n $language: LanguageCode\n $last: Int\n $term: String!\n $startCursor: String\n ) @inContext(country: $country, language: $language) {\n articles: search(\n query: $term,\n types: [ARTICLE],\n first: $first,\n ) {\n nodes {\n ...on Article {\n ...SearchArticle\n }\n }\n }\n pages: search(\n query: $term,\n types: [PAGE],\n first: $first,\n ) {\n nodes {\n ...on Page {\n ...SearchPage\n }\n }\n }\n products: search(\n after: $endCursor,\n before: $startCursor,\n first: $first,\n last: $last,\n query: $term,\n sortKey: RELEVANCE,\n types: [PRODUCT],\n unavailableProducts: HIDE,\n ) {\n nodes {\n ...on Product {\n ...SearchProduct\n }\n }\n pageInfo {\n ...PageInfoFragment\n }\n }\n }\n #graphql\n fragment SearchProduct on Product {\n __typename\n handle\n id\n publishedAt\n title\n trackingParameters\n vendor\n variants(first: 1) {\n nodes {\n id\n image {\n url\n altText\n width\n height\n }\n price {\n amount\n currencyCode\n }\n compareAtPrice {\n amount\n currencyCode\n }\n selectedOptions {\n name\n value\n }\n product {\n handle\n title\n }\n }\n }\n }\n\n #graphql\n fragment SearchPage on Page {\n __typename\n handle\n id\n title\n trackingParameters\n }\n\n #graphql\n fragment SearchArticle on Article {\n __typename\n handle\n id\n title\n trackingParameters\n }\n\n #graphql\n fragment PageInfoFragment on PageInfo {\n hasNextPage\n hasPreviousPage\n startCursor\n endCursor\n }\n\n': {
return: RegularSearchQuery;
variables: RegularSearchQueryVariables;
Expand Down
Loading

0 comments on commit bbc91c8

Please sign in to comment.