Skip to content

Note that REST filter examples need populate to surface traversed relations#3144

Merged
pwizla merged 1 commit into
strapi:mainfrom
singhvishalkr:cms/clarify-rest-filter-examples-relation-population
May 11, 2026
Merged

Note that REST filter examples need populate to surface traversed relations#3144
pwizla merged 1 commit into
strapi:mainfrom
singhvishalkr:cms/clarify-rest-filter-examples-relation-population

Conversation

@singhvishalkr
Copy link
Copy Markdown
Contributor

What

Two open issues report the same root cause on the same page:

  • #2066 flags that the Complex filtering example filters books on author.name but the response example only shows the book's own attributes (name, date), with no author field anywhere.
  • #2067 flags the same shape for Deep filtering: the filter traverses chef.restaurants.stars, but the response example only shows the restaurant's own name and stars.

Both are correct: the bare REST response does not include relations unless they are populated, so the example output reads as if the filter never matched on those keys.

Where

docusaurus/docs/cms/api/rest/filters.md, immediately after the existing response example in each section. The two sections already have a generic :::note mentioning that relations are not populated by default; the new notes are scoped to "this specific example" and link to the populate docs with a copy-pasteable parameter.

Diff intent

  • Add a :::note after the Complex filtering response example pointing to &populate=author.
  • Add a :::note after the Deep filtering response example pointing to &populate[chef][populate][restaurants]=true.

Closes #2066
Closes #2067

@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
documentation Ready Ready Preview, Comment May 7, 2026 4:54pm

Request Review

Copy link
Copy Markdown
Collaborator

@pwizla pwizla left a comment

Choose a reason for hiding this comment

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

LGTM, thanks, @singhvishalkr !

@pwizla pwizla self-assigned this May 11, 2026
@pwizla pwizla added pr: chore source: CMS contribution PRs that are part of the Documentation Contribution Program labels May 11, 2026
@pwizla pwizla added this to the 6.25.0 milestone May 11, 2026
@pwizla pwizla merged commit 5572d5b into strapi:main May 11, 2026
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contribution PRs that are part of the Documentation Contribution Program pr: chore source: CMS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DOCS: Deep filtering mentions fields which are not in the example DOCS: Complex filtering mentions fields which are not in the example

2 participants