customerSet error The input field corresponding to the identifier is required

Has anyone had success with getting customerSetto work? I’m using the example code from Shopify, but am getting error The input field corresponding to the identifier is required.

mutation customerSet($input: CustomerSetInput!, $identifier: CustomerSetIdentifiers) {
  customerSet(input: $input, identifier: $identifier) {
    customer {
      id
      displayName
      firstName
      lastName
      locale
      defaultEmailAddress {
        emailAddress
      }
      defaultPhoneNumber {
        phoneNumber
      }
      tags
      taxExempt
    }
    userErrors {
      field
      message
    }
  }
}

Variables:

{
  "identifier": {
    "email": "test1@example.com"
  },
  "input": {
    "firstName": "NewFirstName"
  }
}

You are missing the email field in the input object.

{
  "identifier": {
    "email": "test1@example.com"
  },
  "input": {
    "email": "test1@example.com",
    "firstName": "NewFirstName"
  }
}

The customerSet mutation requires that the value used in the identifier is also present in the input.

Thank you! That worked. Odd error message.