We are using graphql-codegen
to generate Admin API types for our TypeScript project, targeting API version 2025-01
.
We’ve observed that the productSet
mutation input no longer includes the id
field as a parameter. According to the documentation, the id
field is now marked as deprecated. However, we can confirm that just a couple of weeks ago, in version 2025-01
, it was not marked as deprecated.
We also noticed that API version 2025-04
introduces a new way to specify identifiers using the identifier
property. However, this property is not available in version 2025-01
.
As a result, graphql-codegen
no longer generates the id
property in the input type. Here is the generated type:
/** The input fields required to create or update a product via ProductSet mutation. */
export type ProductSetInput = {
category?: InputMaybe<Scalars['ID']['input']>;
claimOwnership?: InputMaybe<ProductClaimOwnershipInput>;
collections?: InputMaybe<Array<Scalars['ID']['input']>>;
combinedListingRole?: InputMaybe<CombinedListingsRole>;
descriptionHtml?: InputMaybe<Scalars['String']['input']>;
files?: InputMaybe<Array<FileSetInput>>;
giftCard?: InputMaybe<Scalars['Boolean']['input']>;
giftCardTemplateSuffix?: InputMaybe<Scalars['String']['input']>;
handle?: InputMaybe<Scalars['String']['input']>;
metafields?: InputMaybe<Array<MetafieldInput>>;
productOptions?: InputMaybe<Array<OptionSetInput>>;
productType?: InputMaybe<Scalars['String']['input']>;
redirectNewHandle?: InputMaybe<Scalars['Boolean']['input']>;
requiresSellingPlan?: InputMaybe<Scalars['Boolean']['input']>;
seo?: InputMaybe<SeoInput>;
status?: InputMaybe<ProductStatus>;
tags?: InputMaybe<Array<Scalars['String']['input']>>;
templateSuffix?: InputMaybe<Scalars['String']['input']>;
title?: InputMaybe<Scalars['String']['input']>;
variants?: InputMaybe<Array<ProductVariantSetInput>>;
vendor?: InputMaybe<Scalars['String']['input']>;
};
There is no way that we can use automated type generation of at this moment because the id property is missing and productSet mutation version 2025-01 does not have identifier property either.