productSet
and customerSet
mutations now support upserts and custom IDs
productSet
and customerSet
mutations now support upserts and custom IDsAs of version 2025-04, the and
mutations of the GraphQL Admin API support upserting (creating or updating) records by
identifier
.
When identifier
is provided, these mutations use it to check for an existing record. If an existing record is found, then the mutation updates it with the data provided in input
. Otherwise, the mutation creates a new record.
The identifier
gives developers a straightforward, idempotent mechanism to create and subsequently update records with the same shape of inputs, without the need for extra queries to check if records exist. For identifiers, allows
handle
, id
, and .
allows
phone
, email
, and .
This extends previously existing behaviour on , which updates a record if
id
is provided in the input
and otherwise creates a new record. The mutation was previously released only to the
unstable
version of the API.
Read more about using Custom IDs.