Skip to main content

Replace Mutation

The Replace mutation enables you to replace a portion of the existing value with a new string. This mutation is often used for correcting or standardizing specific substrings within a product field. It also supports regular expressions for more advanced matching and replacing.

Options

  • Search Value: The substring or regex pattern you want to replace within the existing value.
  • Replacement Value: The new substring that will replace the 'Search Value'.
  • Use Regex: Toggle to enable or disable regular expression matching.

Example

Suppose some of our product urls are http and we want to make sure they use https. We can use the Replace mutation to swap out the http with https.

A screenshot showing the Replace mutation.
Replace Mutation Example