Skip to content

Review Diffs Before Syncing

Always review what will change before running a sync operation. The --dry-run flag shows a colored diff without making any changes.

To see what a forward sync would change in the local file:

Terminal window
yarn sync:questionnaire -q <slug> --dry-run

This fetches the current published data from Strapi and shows a diff against the existing local .ts file. Useful for checking if a Strapi edit was made correctly before overwriting the local file.

To see what a reverse sync would change in Strapi:

Terminal window
yarn reverse-sync:questionnaire -q <slug> --dry-run

This compares the local file against the current Strapi draft/published state and shows the differences.

  • Green lines — Additions (new content)
  • Red lines — Deletions (removed content)
  • White lines — Unchanged context
Check Why
Only your intended changes appear Confirms you edited the right fields
No unintended deletions Prevents accidentally removing questions or rules
String formatting is consistent Detects whitespace or encoding issues
Question IDs are correct Typos in IDs break rules and navigation

If you are confident in the changes and want to skip the interactive confirmation prompt:

Terminal window
yarn sync:questionnaire -q <slug> --force
yarn reverse-sync:questionnaire -q <slug> --force