Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

kjac
Copy link
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
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
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