Skip to content

Commit

Permalink
follow up for graphql-codegen dependency pump in examples folder (#2101)
Browse files Browse the repository at this point in the history
  • Loading branch information
michenly committed May 10, 2024
1 parent 9dfd1cf commit 55378a4
Show file tree
Hide file tree
Showing 8 changed files with 186 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/b2b/customer-accountapi.generated.d.ts
@@ -1,7 +1,7 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable eslint-comments/no-unlimited-disable */
/* eslint-disable */
import * as CustomerAccountAPI from '@shopify/hydrogen/customer-account-api-types';
import type * as CustomerAccountAPI from '@shopify/hydrogen/customer-account-api-types';

export type CustomerAddressUpdateMutationVariables = CustomerAccountAPI.Exact<{
address: CustomerAccountAPI.CustomerAddressInput;
Expand Down
2 changes: 1 addition & 1 deletion examples/b2b/storefrontapi.generated.d.ts
@@ -1,7 +1,7 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable eslint-comments/no-unlimited-disable */
/* eslint-disable */
import * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';
import type * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';

export type MoneyFragment = Pick<
StorefrontAPI.MoneyV2,
Expand Down
55 changes: 54 additions & 1 deletion examples/custom-cart-method/storefrontapi.generated.d.ts
@@ -1,7 +1,7 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable eslint-comments/no-unlimited-disable */
/* eslint-disable */
import * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';
import type * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';

export type MoneyFragment = Pick<
StorefrontAPI.MoneyV2,
Expand Down Expand Up @@ -696,6 +696,55 @@ export type StoreCollectionsQuery = {
};
};

export type CatalogQueryVariables = StorefrontAPI.Exact<{
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
first?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
last?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
startCursor?: StorefrontAPI.InputMaybe<
StorefrontAPI.Scalars['String']['input']
>;
endCursor?: StorefrontAPI.InputMaybe<
StorefrontAPI.Scalars['String']['input']
>;
}>;

export type CatalogQuery = {
products: {
nodes: Array<
Pick<StorefrontAPI.Product, 'id' | 'handle' | 'title'> & {
featuredImage?: StorefrontAPI.Maybe<
Pick<
StorefrontAPI.Image,
'id' | 'altText' | 'url' | 'width' | 'height'
>
>;
priceRange: {
minVariantPrice: Pick<
StorefrontAPI.MoneyV2,
'amount' | 'currencyCode'
>;
maxVariantPrice: Pick<
StorefrontAPI.MoneyV2,
'amount' | 'currencyCode'
>;
};
variants: {
nodes: Array<{
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
}>;
};
}
>;
pageInfo: Pick<
StorefrontAPI.PageInfo,
'hasPreviousPage' | 'hasNextPage' | 'startCursor' | 'endCursor'
>;
};
};

export type PageQueryVariables = StorefrontAPI.Exact<{
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
Expand Down Expand Up @@ -1146,6 +1195,10 @@ interface GeneratedQueryTypes {
return: StoreCollectionsQuery;
variables: StoreCollectionsQueryVariables;
};
'#graphql\n query Catalog(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n products(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n ...ProductItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n #graphql\n fragment MoneyProductItem on MoneyV2 {\n amount\n currencyCode\n }\n fragment ProductItem on Product {\n id\n handle\n title\n featuredImage {\n id\n altText\n url\n width\n height\n }\n priceRange {\n minVariantPrice {\n ...MoneyProductItem\n }\n maxVariantPrice {\n ...MoneyProductItem\n }\n }\n variants(first: 1) {\n nodes {\n selectedOptions {\n name\n value\n }\n }\n }\n }\n\n': {
return: CatalogQuery;
variables: CatalogQueryVariables;
};
'#graphql\n query Page(\n $language: LanguageCode,\n $country: CountryCode,\n $handle: String!\n )\n @inContext(language: $language, country: $country) {\n page(handle: $handle) {\n id\n title\n body\n seo {\n description\n title\n }\n }\n }\n': {
return: PageQuery;
variables: PageQueryVariables;
Expand Down
64 changes: 60 additions & 4 deletions examples/legacy-customer-account-flow/storefrontapi.generated.d.ts
@@ -1,7 +1,7 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable eslint-comments/no-unlimited-disable */
/* eslint-disable */
import * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';
import type * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';

export type MoneyFragment = Pick<
StorefrontAPI.MoneyV2,
Expand Down Expand Up @@ -31,7 +31,7 @@ export type CartLineFragment = Pick<
image?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.Image, 'id' | 'url' | 'altText' | 'width' | 'height'>
>;
product: Pick<StorefrontAPI.Product, 'handle' | 'title' | 'id'>;
product: Pick<StorefrontAPI.Product, 'handle' | 'title' | 'id' | 'vendor'>;
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
Expand All @@ -40,7 +40,7 @@ export type CartLineFragment = Pick<

export type CartApiQueryFragment = Pick<
StorefrontAPI.Cart,
'id' | 'checkoutUrl' | 'totalQuantity' | 'note'
'updatedAt' | 'id' | 'checkoutUrl' | 'totalQuantity' | 'note'
> & {
buyerIdentity: Pick<
StorefrontAPI.CartBuyerIdentity,
Expand Down Expand Up @@ -81,7 +81,10 @@ export type CartApiQueryFragment = Pick<
'id' | 'url' | 'altText' | 'width' | 'height'
>
>;
product: Pick<StorefrontAPI.Product, 'handle' | 'title' | 'id'>;
product: Pick<
StorefrontAPI.Product,
'handle' | 'title' | 'id' | 'vendor'
>;
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
Expand Down Expand Up @@ -1393,6 +1396,55 @@ export type StoreCollectionsQuery = {
};
};

export type CatalogQueryVariables = StorefrontAPI.Exact<{
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
first?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
last?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
startCursor?: StorefrontAPI.InputMaybe<
StorefrontAPI.Scalars['String']['input']
>;
endCursor?: StorefrontAPI.InputMaybe<
StorefrontAPI.Scalars['String']['input']
>;
}>;

export type CatalogQuery = {
products: {
nodes: Array<
Pick<StorefrontAPI.Product, 'id' | 'handle' | 'title'> & {
featuredImage?: StorefrontAPI.Maybe<
Pick<
StorefrontAPI.Image,
'id' | 'altText' | 'url' | 'width' | 'height'
>
>;
priceRange: {
minVariantPrice: Pick<
StorefrontAPI.MoneyV2,
'amount' | 'currencyCode'
>;
maxVariantPrice: Pick<
StorefrontAPI.MoneyV2,
'amount' | 'currencyCode'
>;
};
variants: {
nodes: Array<{
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
}>;
};
}
>;
pageInfo: Pick<
StorefrontAPI.PageInfo,
'hasPreviousPage' | 'hasNextPage' | 'startCursor' | 'endCursor'
>;
};
};

export type PageQueryVariables = StorefrontAPI.Exact<{
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
Expand Down Expand Up @@ -1851,6 +1903,10 @@ interface GeneratedQueryTypes {
return: StoreCollectionsQuery;
variables: StoreCollectionsQueryVariables;
};
'#graphql\n query Catalog(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n products(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n ...ProductItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n #graphql\n fragment MoneyProductItem on MoneyV2 {\n amount\n currencyCode\n }\n fragment ProductItem on Product {\n id\n handle\n title\n featuredImage {\n id\n altText\n url\n width\n height\n }\n priceRange {\n minVariantPrice {\n ...MoneyProductItem\n }\n maxVariantPrice {\n ...MoneyProductItem\n }\n }\n variants(first: 1) {\n nodes {\n selectedOptions {\n name\n value\n }\n }\n }\n }\n\n': {
return: CatalogQuery;
variables: CatalogQueryVariables;
};
'#graphql\n query Page(\n $language: LanguageCode,\n $country: CountryCode,\n $handle: String!\n )\n @inContext(language: $language, country: $country) {\n page(handle: $handle) {\n id\n title\n body\n seo {\n description\n title\n }\n }\n }\n': {
return: PageQuery;
variables: PageQueryVariables;
Expand Down
64 changes: 60 additions & 4 deletions examples/metaobjects/storefrontapi.generated.d.ts
@@ -1,7 +1,7 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable eslint-comments/no-unlimited-disable */
/* eslint-disable */
import * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';
import type * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';

export type MoneyFragment = Pick<
StorefrontAPI.MoneyV2,
Expand Down Expand Up @@ -31,7 +31,7 @@ export type CartLineFragment = Pick<
image?: StorefrontAPI.Maybe<
Pick<StorefrontAPI.Image, 'id' | 'url' | 'altText' | 'width' | 'height'>
>;
product: Pick<StorefrontAPI.Product, 'handle' | 'title' | 'id'>;
product: Pick<StorefrontAPI.Product, 'handle' | 'title' | 'id' | 'vendor'>;
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
Expand All @@ -40,7 +40,7 @@ export type CartLineFragment = Pick<

export type CartApiQueryFragment = Pick<
StorefrontAPI.Cart,
'id' | 'checkoutUrl' | 'totalQuantity' | 'note'
'updatedAt' | 'id' | 'checkoutUrl' | 'totalQuantity' | 'note'
> & {
buyerIdentity: Pick<
StorefrontAPI.CartBuyerIdentity,
Expand Down Expand Up @@ -81,7 +81,10 @@ export type CartApiQueryFragment = Pick<
'id' | 'url' | 'altText' | 'width' | 'height'
>
>;
product: Pick<StorefrontAPI.Product, 'handle' | 'title' | 'id'>;
product: Pick<
StorefrontAPI.Product,
'handle' | 'title' | 'id' | 'vendor'
>;
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
Expand Down Expand Up @@ -602,6 +605,55 @@ export type StoreCollectionsQuery = {
};
};

export type CatalogQueryVariables = StorefrontAPI.Exact<{
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
first?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
last?: StorefrontAPI.InputMaybe<StorefrontAPI.Scalars['Int']['input']>;
startCursor?: StorefrontAPI.InputMaybe<
StorefrontAPI.Scalars['String']['input']
>;
endCursor?: StorefrontAPI.InputMaybe<
StorefrontAPI.Scalars['String']['input']
>;
}>;

export type CatalogQuery = {
products: {
nodes: Array<
Pick<StorefrontAPI.Product, 'id' | 'handle' | 'title'> & {
featuredImage?: StorefrontAPI.Maybe<
Pick<
StorefrontAPI.Image,
'id' | 'altText' | 'url' | 'width' | 'height'
>
>;
priceRange: {
minVariantPrice: Pick<
StorefrontAPI.MoneyV2,
'amount' | 'currencyCode'
>;
maxVariantPrice: Pick<
StorefrontAPI.MoneyV2,
'amount' | 'currencyCode'
>;
};
variants: {
nodes: Array<{
selectedOptions: Array<
Pick<StorefrontAPI.SelectedOption, 'name' | 'value'>
>;
}>;
};
}
>;
pageInfo: Pick<
StorefrontAPI.PageInfo,
'hasPreviousPage' | 'hasNextPage' | 'startCursor' | 'endCursor'
>;
};
};

export type PageQueryVariables = StorefrontAPI.Exact<{
language?: StorefrontAPI.InputMaybe<StorefrontAPI.LanguageCode>;
country?: StorefrontAPI.InputMaybe<StorefrontAPI.CountryCode>;
Expand Down Expand Up @@ -1668,6 +1720,10 @@ interface GeneratedQueryTypes {
return: StoreCollectionsQuery;
variables: StoreCollectionsQueryVariables;
};
'#graphql\n query Catalog(\n $country: CountryCode\n $language: LanguageCode\n $first: Int\n $last: Int\n $startCursor: String\n $endCursor: String\n ) @inContext(country: $country, language: $language) {\n products(first: $first, last: $last, before: $startCursor, after: $endCursor) {\n nodes {\n ...ProductItem\n }\n pageInfo {\n hasPreviousPage\n hasNextPage\n startCursor\n endCursor\n }\n }\n }\n #graphql\n fragment MoneyProductItem on MoneyV2 {\n amount\n currencyCode\n }\n fragment ProductItem on Product {\n id\n handle\n title\n featuredImage {\n id\n altText\n url\n width\n height\n }\n priceRange {\n minVariantPrice {\n ...MoneyProductItem\n }\n maxVariantPrice {\n ...MoneyProductItem\n }\n }\n variants(first: 1) {\n nodes {\n selectedOptions {\n name\n value\n }\n }\n }\n }\n\n': {
return: CatalogQuery;
variables: CatalogQueryVariables;
};
'#graphql\n query Page(\n $language: LanguageCode,\n $country: CountryCode,\n $handle: String!\n )\n @inContext(language: $language, country: $country) {\n page(handle: $handle) {\n id\n title\n body\n seo {\n description\n title\n }\n }\n }\n': {
return: PageQuery;
variables: PageQueryVariables;
Expand Down
8 changes: 8 additions & 0 deletions examples/multipass/.graphqlrc.yml
@@ -0,0 +1,8 @@
projects:
default:
schema: 'node_modules/@shopify/hydrogen/storefront.schema.json'
documents:
- '!*.d.ts'
- '*.{ts,tsx,js,jsx}'
- 'app/**/*.{ts,tsx,js,jsx}'
- '!app/graphql/**/*.{ts,tsx,js,jsx}'
2 changes: 1 addition & 1 deletion examples/multipass/storefrontapi.generated.d.ts
@@ -1,7 +1,7 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable eslint-comments/no-unlimited-disable */
/* eslint-disable */
import * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';
import type * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';

export type MenuItemFragment = Pick<
StorefrontAPI.MenuItem,
Expand Down
2 changes: 1 addition & 1 deletion examples/subscriptions/storefrontapi.generated.d.ts
@@ -1,7 +1,7 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable eslint-comments/no-unlimited-disable */
/* eslint-disable */
import * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';
import type * as StorefrontAPI from '@shopify/hydrogen/storefront-api-types';

export type ShopFragment = Pick<
StorefrontAPI.Shop,
Expand Down

0 comments on commit 55378a4

Please sign in to comment.