ProductSet 2025-01 id missing from generated types

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.

1 Like

Hey @mise

I tried to replicate your issue with the missing id field in ProductSetInput for API version 2025-01, but I wasn’t able to reproduce it. Here’s what I did:

I followed the standard setup from the Shopify documentation:

When I checked the generated ProductSetInput type in my app/types directory, the id field was present. I was able to use the id field in my code without any TypeScript errors.

Are you using any custom configuration in your .graphqlrc.ts file that might exclude deprecated fields? Or maybe a specific version of the codegen packages? The difference in our results suggests there might be something in your setup causing deprecated fields to be excluded from the generated types so looking at the above may help.

Looking specifically at the deprecated tag that just recently popped up on 2025-01, that’s due to the pending stable release of 2025-04, where the ID field is removed in favour of the new identifier argument.

Hope that helps!

Hi @mise

Just wanted to follow up here - are you still experiencing an issue or can I mark this as solved/closed?