Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Commit 8ee1ffb

Browse files
committed
Update the schema and types
1 parent ea3e88e commit 8ee1ffb

3 files changed

Lines changed: 123 additions & 3 deletions

File tree

CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Processes that need to happen:
5353
- However, don't replace documentation unless it makes sense.
5454
- Also be careful that some versions of the Storefront API don't exactly match code here: for example, SFAPI `2022-07` could be both `2022-07` and `2022-7` in this codebase.
5555
- Run the `graphql-types` NPM script to generate the new types.
56+
- Look through the new schema and see if there are any breaking changes
5657
- If there are new scalars, or scalars are removed, update the `codegen.yml` file's custom scalar settings and run the command again.
5758
- Search for all instances of `@deprecated` and see if it is time to make that breaking change
5859
- Run the `ci:checks` NPM script and fix any issues that may come up.

packages/react/src/storefront-api-types.d.ts

Lines changed: 121 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* THIS FILE IS AUTO-GENERATED, DO NOT EDIT
3-
* Based on Storefront API 2022-10
4-
* If changes need to happen to the types defined in this file, then generally the Storefront API needs to update, and then you can run `yarn graphql-types`
3+
* Based on Storefront API 2023-01
4+
* If changes need to happen to the types defined in this file, then generally the Storefront API needs to update. After it's updated, you can run `yarn graphql-types`.
55
* Except custom Scalars, which are defined in the `codegen.ts` file
66
*/
77
/* eslint-disable */
@@ -1312,6 +1312,8 @@ export type CheckoutErrorCode =
13121312
| 'CUSTOMER_ALREADY_USED_ONCE_PER_CUSTOMER_DISCOUNT_NOTICE'
13131313
/** Discount already applied. */
13141314
| 'DISCOUNT_ALREADY_APPLIED'
1315+
/** Discount code isn't working right now. Please contact us for help. */
1316+
| 'DISCOUNT_CODE_APPLICATION_FAILED'
13151317
/** Discount disabled. */
13161318
| 'DISCOUNT_DISABLED'
13171319
/** Discount expired. */
@@ -4331,6 +4333,7 @@ export type MetafieldReference =
43314333
| Collection
43324334
| GenericFile
43334335
| MediaImage
4336+
| Metaobject
43344337
| Page
43354338
| Product
43364339
| ProductVariant
@@ -4362,6 +4365,93 @@ export type MetafieldReferenceEdge = {
43624365
node: MetafieldReference;
43634366
};
43644367

4368+
/** An instance of a user-defined model based on a MetaobjectDefinition. */
4369+
export type Metaobject = Node & {
4370+
__typename?: 'Metaobject';
4371+
/** Accesses a field of the object by key. */
4372+
field?: Maybe<MetaobjectField>;
4373+
/**
4374+
* All object fields with defined values.
4375+
* Omitted object keys can be assumed null, and no guarantees are made about field order.
4376+
*
4377+
*/
4378+
fields: Array<MetaobjectField>;
4379+
/** The unique handle of the metaobject. Useful as a custom ID. */
4380+
handle: Scalars['String'];
4381+
/** A globally-unique identifier. */
4382+
id: Scalars['ID'];
4383+
/** The type of the metaobject. Defines the namespace of its associated metafields. */
4384+
type: Scalars['String'];
4385+
/** The date and time when the metaobject was last updated. */
4386+
updatedAt: Scalars['DateTime'];
4387+
};
4388+
4389+
/** An instance of a user-defined model based on a MetaobjectDefinition. */
4390+
export type MetaobjectFieldArgs = {
4391+
key: Scalars['String'];
4392+
};
4393+
4394+
/**
4395+
* An auto-generated type for paginating through multiple Metaobjects.
4396+
*
4397+
*/
4398+
export type MetaobjectConnection = {
4399+
__typename?: 'MetaobjectConnection';
4400+
/** A list of edges. */
4401+
edges: Array<MetaobjectEdge>;
4402+
/** A list of the nodes contained in MetaobjectEdge. */
4403+
nodes: Array<Metaobject>;
4404+
/** Information to aid in pagination. */
4405+
pageInfo: PageInfo;
4406+
};
4407+
4408+
/**
4409+
* An auto-generated type which holds one Metaobject and a cursor during pagination.
4410+
*
4411+
*/
4412+
export type MetaobjectEdge = {
4413+
__typename?: 'MetaobjectEdge';
4414+
/** A cursor for use in pagination. */
4415+
cursor: Scalars['String'];
4416+
/** The item at the end of MetaobjectEdge. */
4417+
node: Metaobject;
4418+
};
4419+
4420+
/** Provides the value of a Metaobject field. */
4421+
export type MetaobjectField = {
4422+
__typename?: 'MetaobjectField';
4423+
/** The field key. */
4424+
key: Scalars['String'];
4425+
/** A referenced object if the field type is a resource reference. */
4426+
reference?: Maybe<MetafieldReference>;
4427+
/** A list of referenced objects if the field type is a resource reference list. */
4428+
references?: Maybe<MetafieldReferenceConnection>;
4429+
/**
4430+
* The type name of the field.
4431+
* See the list of [supported types](https://shopify.dev/apps/metafields/definitions/types).
4432+
*
4433+
*/
4434+
type: Scalars['String'];
4435+
/** The field value. */
4436+
value?: Maybe<Scalars['String']>;
4437+
};
4438+
4439+
/** Provides the value of a Metaobject field. */
4440+
export type MetaobjectFieldReferencesArgs = {
4441+
after?: InputMaybe<Scalars['String']>;
4442+
before?: InputMaybe<Scalars['String']>;
4443+
first?: InputMaybe<Scalars['Int']>;
4444+
last?: InputMaybe<Scalars['Int']>;
4445+
};
4446+
4447+
/** The input fields used to retrieve a metaobject by handle. */
4448+
export type MetaobjectHandleInput = {
4449+
/** The handle of the metaobject. */
4450+
handle: Scalars['String'];
4451+
/** The type of the metaobject. */
4452+
type: Scalars['String'];
4453+
};
4454+
43654455
/** Represents a Shopify hosted 3D model. */
43664456
export type Model3d = Media &
43674457
Node & {
@@ -4820,6 +4910,8 @@ export type Order = HasMetafields &
48204910
currentTotalPrice: MoneyV2;
48214911
/** The total of all taxes applied to the order, excluding taxes for returned line items. */
48224912
currentTotalTax: MoneyV2;
4913+
/** A list of the custom attributes added to the order. */
4914+
customAttributes: Array<Attribute>;
48234915
/** The locale code in which this specific order happened. */
48244916
customerLocale?: Maybe<Scalars['String']>;
48254917
/** The unique URL that the customer can use to access the order. */
@@ -5539,6 +5631,8 @@ export type ProductFilter = {
55395631
productType?: InputMaybe<Scalars['String']>;
55405632
/** The product vendor to filter on. */
55415633
productVendor?: InputMaybe<Scalars['String']>;
5634+
/** A product tag to filter on. */
5635+
tag?: InputMaybe<Scalars['String']>;
55425636
/** A variant metafield to filter on. */
55435637
variantMetafield?: InputMaybe<MetafieldFilter>;
55445638
/** A variant option to filter on. */
@@ -5713,6 +5807,7 @@ export type ProductVariantStoreAvailabilityArgs = {
57135807
before?: InputMaybe<Scalars['String']>;
57145808
first?: InputMaybe<Scalars['Int']>;
57155809
last?: InputMaybe<Scalars['Int']>;
5810+
near?: InputMaybe<GeoCoordinateInput>;
57165811
reverse?: InputMaybe<Scalars['Boolean']>;
57175812
};
57185813

@@ -5801,6 +5896,10 @@ export type QueryRoot = {
58015896
locations: LocationConnection;
58025897
/** A storefront menu. */
58035898
menu?: Maybe<Menu>;
5899+
/** Fetch a specific Metaobject by one of its unique identifiers. */
5900+
metaobject?: Maybe<Metaobject>;
5901+
/** All active metaobjects for the shop. */
5902+
metaobjects: MetaobjectConnection;
58045903
/** Returns a specific node by ID. */
58055904
node?: Maybe<
58065905
| AppliedGiftCard
@@ -5820,6 +5919,7 @@ export type QueryRoot = {
58205919
| Menu
58215920
| MenuItem
58225921
| Metafield
5922+
| Metaobject
58235923
| Model3d
58245924
| Order
58255925
| Page
@@ -5852,6 +5952,7 @@ export type QueryRoot = {
58525952
| Menu
58535953
| MenuItem
58545954
| Metafield
5955+
| Metaobject
58555956
| Model3d
58565957
| Order
58575958
| Page
@@ -5987,6 +6088,23 @@ export type QueryRootMenuArgs = {
59876088
handle: Scalars['String'];
59886089
};
59896090

6091+
/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */
6092+
export type QueryRootMetaobjectArgs = {
6093+
handle?: InputMaybe<MetaobjectHandleInput>;
6094+
id?: InputMaybe<Scalars['ID']>;
6095+
};
6096+
6097+
/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */
6098+
export type QueryRootMetaobjectsArgs = {
6099+
after?: InputMaybe<Scalars['String']>;
6100+
before?: InputMaybe<Scalars['String']>;
6101+
first?: InputMaybe<Scalars['Int']>;
6102+
last?: InputMaybe<Scalars['Int']>;
6103+
reverse?: InputMaybe<Scalars['Boolean']>;
6104+
sortKey?: InputMaybe<Scalars['String']>;
6105+
type: Scalars['String'];
6106+
};
6107+
59906108
/** The schema’s entry-point for queries. This acts as the public, top-level API from which all queries must start. */
59916109
export type QueryRootNodeArgs = {
59926110
id: Scalars['ID'];
@@ -6062,6 +6180,7 @@ export type QueryRootUrlRedirectsArgs = {
60626180
before?: InputMaybe<Scalars['String']>;
60636181
first?: InputMaybe<Scalars['Int']>;
60646182
last?: InputMaybe<Scalars['Int']>;
6183+
query?: InputMaybe<Scalars['String']>;
60656184
reverse?: InputMaybe<Scalars['Boolean']>;
60666185
};
60676186

packages/react/storefront.schema.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)