Skip to content

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

Open
singhvishalkr wants to merge 1 commit intostrapi:mainfrom
singhvishalkr:cms/clarify-rest-filter-examples-relation-population
Open

Note that REST filter examples need populate to surface traversed relations#3144
singhvishalkr wants to merge 1 commit intostrapi: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

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

Labels

None yet

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

1 participant