Skip to content

Commit

Permalink
fix(migrate): submit mutations with visibility=async (#5675)
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoerge authored Feb 5, 2024
1 parent 7332a9f commit 0eda4a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/@sanity/migrate/src/fetch-utils/endpoints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const endpoints = {
options?: {
returnIds?: boolean
returnDocuments?: boolean
visiblity?: 'async' | 'sync' | 'deferred'
visibility?: 'async' | 'sync' | 'deferred'
dryRun?: boolean
tag?: string
},
Expand All @@ -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][]

Expand Down
2 changes: 1 addition & 1 deletion packages/@sanity/migrate/src/runner/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
}
Expand Down

0 comments on commit 0eda4a7

Please sign in to comment.