Skip to content

Commit

Permalink
more test
Browse files Browse the repository at this point in the history
  • Loading branch information
wizardlyhel committed Nov 29, 2024
1 parent 68dd48f commit 3e40ea4
Show file tree
Hide file tree
Showing 10 changed files with 1,404 additions and 815 deletions.
34 changes: 0 additions & 34 deletions examples/b2b/storefrontapi.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,36 +252,6 @@ export type StoreRobotsQueryVariables = StorefrontAPI.Exact<{

export type StoreRobotsQuery = {shop: Pick<StorefrontAPI.Shop, 'id'>};

export type SitemapQueryVariables = StorefrontAPI.Exact<{
urlLimits?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
}>;

export type SitemapQuery = {
products: {
nodes: Array<
Pick<
StorefrontAPI.Product,
'updatedAt' | 'handle' | 'onlineStoreUrl' | 'title'
> & {
featuredImage?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.Image, 'url' | 'altText'>
>;
}
>;
};
collections: {
nodes: Array<
Pick<StorefrontAPI.Collection, 'updatedAt' | 'handle' | 'onlineStoreUrl'>
>;
};
pages: {
nodes: Array<
Pick<StorefrontAPI.Page, 'updatedAt' | 'handle' | 'onlineStoreUrl'>
>;
};
};

export type FeaturedCollectionFragment = Pick<
StorefrontAPI.Collection,
'id' | 'title' | 'handle'
Expand Down Expand Up @@ -1256,10 +1226,6 @@ interface GeneratedQueryTypes {
return: StoreRobotsQuery;
variables: StoreRobotsQueryVariables;
};
'#graphql\n query Sitemap($urlLimits: Int, $language: LanguageCode)\n @inContext(language: $language) {\n products(\n first: $urlLimits\n query: "published_status:\'online_store:visible\'"\n ) {\n nodes {\n updatedAt\n handle\n onlineStoreUrl\n title\n featuredImage {\n url\n altText\n }\n }\n }\n collections(\n first: $urlLimits\n query: "published_status:\'online_store:visible\'"\n ) {\n nodes {\n updatedAt\n handle\n onlineStoreUrl\n }\n }\n pages(first: $urlLimits, query: "published_status:\'published\'") {\n nodes {\n updatedAt\n handle\n onlineStoreUrl\n }\n }\n }\n': {
return: SitemapQuery;
variables: SitemapQueryVariables;
};
'#graphql\n fragment FeaturedCollection on Collection {\n id\n title\n image {\n id\n url\n altText\n width\n height\n }\n handle\n }\n query FeaturedCollection($country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n collections(first: 1, sortKey: UPDATED_AT, reverse: true) {\n nodes {\n ...FeaturedCollection\n }\n }\n }\n': {
return: FeaturedCollectionQuery;
variables: FeaturedCollectionQueryVariables;
Expand Down
190 changes: 149 additions & 41 deletions examples/custom-cart-method/storefrontapi.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,36 +254,6 @@ export type StoreRobotsQueryVariables = StorefrontAPI.Exact<{

export type StoreRobotsQuery = {shop: Pick<StorefrontAPI.Shop, 'id'>};

export type SitemapQueryVariables = StorefrontAPI.Exact<{
urlLimits?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
}>;

export type SitemapQuery = {
products: {
nodes: Array<
Pick<
StorefrontAPI.Product,
'updatedAt' | 'handle' | 'onlineStoreUrl' | 'title'
> & {
featuredImage?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.Image, 'url' | 'altText'>
>;
}
>;
};
collections: {
nodes: Array<
Pick<StorefrontAPI.Collection, 'updatedAt' | 'handle' | 'onlineStoreUrl'>
>;
};
pages: {
nodes: Array<
Pick<StorefrontAPI.Page, 'updatedAt' | 'handle' | 'onlineStoreUrl'>
>;
};
};

export type FeaturedCollectionFragment = Pick<
StorefrontAPI.Collection,
'id' | 'title' | 'handle'
Expand Down Expand Up @@ -739,10 +709,81 @@ export type ProductVariantFragment = Pick<

export type ProductFragment = Pick<
StorefrontAPI.Product,
'id' | 'title' | 'vendor' | 'handle' | 'descriptionHtml' | 'description'
| 'id'
| 'title'
| 'vendor'
| 'handle'
| 'descriptionHtml'
| 'description'
| 'encodedVariantExistence'
| 'encodedVariantAvailability'
> & {
options: Array<Pick<StorefrontAPI.ProductOption, 'name' | 'values'>>;
selectedVariant?: StorefrontAPI.Maybe<
options: Array<
Pick<StorefrontAPI.ProductOption, 'name'> & {
optionValues: Array<
Pick<StorefrontAPI.ProductOptionValue, 'name'> & {
firstSelectableVariant?: StorefrontAPI.Maybe<
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'>
>;
}
>;
swatch?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.ProductOptionValueSwatch, 'color'> & {
image?: StorefrontAPI.Maybe<{
previewImage?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.Image, 'url'>
>;
}>;
}
>;
}
>;
}
>;
selectedOrFirstAvailableVariant?: StorefrontAPI.Maybe<
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'>
>;
}
>;
adjacentVariants: Array<
Pick<
StorefrontAPI.ProductVariant,
'availableForSale' | 'id' | 'sku' | 'title'
Expand Down Expand Up @@ -808,10 +849,81 @@ export type ProductQuery = {
product?: StorefrontAPI.Maybe<
Pick<
StorefrontAPI.Product,
'id' | 'title' | 'vendor' | 'handle' | 'descriptionHtml' | 'description'
| 'id'
| 'title'
| 'vendor'
| 'handle'
| 'descriptionHtml'
| 'description'
| 'encodedVariantExistence'
| 'encodedVariantAvailability'
> & {
options: Array<Pick<StorefrontAPI.ProductOption, 'name' | 'values'>>;
selectedVariant?: StorefrontAPI.Maybe<
options: Array<
Pick<StorefrontAPI.ProductOption, 'name'> & {
optionValues: Array<
Pick<StorefrontAPI.ProductOptionValue, 'name'> & {
firstSelectableVariant?: StorefrontAPI.Maybe<
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'>
>;
}
>;
swatch?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.ProductOptionValueSwatch, 'color'> & {
image?: StorefrontAPI.Maybe<{
previewImage?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.Image, 'url'>
>;
}>;
}
>;
}
>;
}
>;
selectedOrFirstAvailableVariant?: StorefrontAPI.Maybe<
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'>
>;
}
>;
adjacentVariants: Array<
Pick<
StorefrontAPI.ProductVariant,
'availableForSale' | 'id' | 'sku' | 'title'
Expand Down Expand Up @@ -1175,10 +1287,6 @@ interface GeneratedQueryTypes {
return: StoreRobotsQuery;
variables: StoreRobotsQueryVariables;
};
'#graphql\n query Sitemap($urlLimits: Int, $language: LanguageCode)\n @inContext(language: $language) {\n products(\n first: $urlLimits\n query: "published_status:\'online_store:visible\'"\n ) {\n nodes {\n updatedAt\n handle\n onlineStoreUrl\n title\n featuredImage {\n url\n altText\n }\n }\n }\n collections(\n first: $urlLimits\n query: "published_status:\'online_store:visible\'"\n ) {\n nodes {\n updatedAt\n handle\n onlineStoreUrl\n }\n }\n pages(first: $urlLimits, query: "published_status:\'published\'") {\n nodes {\n updatedAt\n handle\n onlineStoreUrl\n }\n }\n }\n': {
return: SitemapQuery;
variables: SitemapQueryVariables;
};
'#graphql\n fragment FeaturedCollection on Collection {\n id\n title\n image {\n id\n url\n altText\n width\n height\n }\n handle\n }\n query FeaturedCollection($country: CountryCode, $language: LanguageCode)\n @inContext(country: $country, language: $language) {\n collections(first: 1, sortKey: UPDATED_AT, reverse: true) {\n nodes {\n ...FeaturedCollection\n }\n }\n }\n': {
return: FeaturedCollectionQuery;
variables: FeaturedCollectionQueryVariables;
Expand Down Expand Up @@ -1223,7 +1331,7 @@ 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 options {\n name\n values\n }\n selectedVariant: variantBySelectedOptions(selectedOptions: $selectedOptions, ignoreUnknownOptions: true, caseInsensitiveMatch: true) {\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 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': {
return: ProductQuery;
variables: ProductQueryVariables;
};
Expand Down
Loading

0 comments on commit 3e40ea4

Please sign in to comment.