depth parameter in Rest API query not working

default discord avatar
kill_jo
3 weeks ago

Whatever I set the depth parameter in a Rest API query, all relations are not populated. What is the problem? I try:

http://localhost:3030/api/posts?depth=10


Ok, I found the answer. The problem was


access: {
    read: () => true,
}
    Open the post
    Continue the discussion in Discord
    Like what we're doing?
    Star us on GitHub!

    Star

    Connect with the Payload Community on Discord

    Discord

    online

    Can't find what you're looking for?

    Get help straight from the Payload team with an Enterprise License.