diff --git a/packages/@sanity/migrate/src/fetch-utils/endpoints.ts b/packages/@sanity/migrate/src/fetch-utils/endpoints.ts index 03a1e13fa3b..9dcb46becf3 100644 --- a/packages/@sanity/migrate/src/fetch-utils/endpoints.ts +++ b/packages/@sanity/migrate/src/fetch-utils/endpoints.ts @@ -34,7 +34,7 @@ export const endpoints = { options?: { returnIds?: boolean returnDocuments?: boolean - visiblity?: 'async' | 'sync' | 'deferred' + visibility?: 'async' | 'sync' | 'deferred' dryRun?: boolean tag?: string }, @@ -43,7 +43,7 @@ export const endpoints = { options?.tag && ['tag', options.tag], options?.returnIds && ['returnIds', 'true'], options?.returnDocuments && ['returnDocuments', 'true'], - options?.visiblity && ['visibility', options.visiblity], + options?.visibility && ['visibility', options.visibility], options?.dryRun && ['dryRun', 'true'], ].filter(Boolean) as [string, string][] diff --git a/packages/@sanity/migrate/src/runner/run.ts b/packages/@sanity/migrate/src/runner/run.ts index 3fb6df6aba0..3f57706827d 100644 --- a/packages/@sanity/migrate/src/runner/run.ts +++ b/packages/@sanity/migrate/src/runner/run.ts @@ -45,7 +45,7 @@ export async function* toFetchOptionsIterable( token: apiConfig.token, tag: 'sanity.migration.mutate', apiHost: apiConfig.apiHost ?? 'api.sanity.io', - endpoint: endpoints.data.mutate(apiConfig.dataset, {returnIds: true}), + endpoint: endpoints.data.mutate(apiConfig.dataset, {returnIds: true, visibility: 'async'}), body: JSON.stringify(transaction), }) }