Skip to content

Commit

Permalink
feat(sanity): include only necessary fields in release projection (#8472
Browse files Browse the repository at this point in the history
)
  • Loading branch information
juice49 authored and pedrobonamin committed Feb 4, 2025
1 parent af3fede commit 553cc2e
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions packages/sanity/src/core/releases/store/createReleaseStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,21 @@ export const SORT_ORDER = 'desc'

const QUERY_FILTER = `_type=="${RELEASE_DOCUMENT_TYPE}" && _id in path("${RELEASE_DOCUMENTS_PATH}.*")`

// TODO: Extend the projection with the fields needed
const QUERY_PROJECTION = `{
...,
_id,
_type,
_rev,
_createdAt,
_updatedAt,
state,
finalDocumentStates,
publishAt,
metadata {
title,
description,
intendedPublishAt,
releaseType
}
}`

// Newest releases first
Expand Down

0 comments on commit 553cc2e

Please sign in to comment.