Skip to content

Make the Delivery API "ancestors" selector work with preview#17938

Merged
kjac merged 1 commit intorelease/13.6from
v13/fix/17165-ancestor-selector-should-work-in-preview
Jan 13, 2025
Merged

Make the Delivery API "ancestors" selector work with preview#17938
kjac merged 1 commit intorelease/13.6from
v13/fix/17165-ancestor-selector-should-work-in-preview

Conversation

@kjac
Copy link
Copy Markdown
Contributor

@kjac kjac commented Jan 10, 2025

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #17165

Description

This PR ensures that the "ancestors" selector for the Delivery API works for unpublished content.

Testing this PR

  1. Create a content structure and publish it.
  2. Add an unpublished child (or structure) somewhere in the published structure.
  3. Query ancestors of the unpublished child using the Delivery API.

Expected result:

  1. When querying without an API key (or not for preview), nothing should be returned.
  2. When querying for preview, the ancestors should be returned.

Also test that ancestors can be retrieved for published content outside of preview 😄

Copy link
Copy Markdown
Member

@Zeegaan Zeegaan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, tests good 🚀

@kjac
Copy link
Copy Markdown
Contributor Author

kjac commented Jan 13, 2025

Cherry-picked to v15/dev in #17950

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants