Should the
depth
parameter for the Rest API work for polymoprhic relationships and/or block fields as well? I'm struggling to get my block's polymorphic relationship to populate no matter the depth parameter.
I have a
cta-blockon my homepage global and in my project case studies. The
cta-blockhas a link field, which (like the payload template) allows for internal and external links. When
internal, the field is a relation to either my
Pagescollection or
Projectscollection.
I can't get
depth=N
to populate the relation in the link field. It's always just the document ID.
(video
https://share.cleanshot.com/xnv1XBwg)
Ah nevermind, just realized my
Pagescollection didn't have public access. Added
access: { read: () => true, },
and it's working as expected 🙏
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.