Possibility to only have certain fields included in relationship #1042
Replies: 1 comment 5 replies
-
Quite simply you want to specify a projection to use on a relation. That makes a lot of sense! Payload currently only deals with this concept with I think you could achieve this in an We probably do want Payload to do what you've described in config and we would accept a PR, but this would require a pretty big change and will need some planning to not break functionality around querying and hooks. Some open questions I have are: |
Beta Was this translation helpful? Give feedback.
-
Use case:
I want to use the relationship field to create a href link to a page.
My collection holds a field called
content
that holds complex nested blocks. For the link I only need theslug
field of the collection.The idea would be to have the option do define a
fields
array for the relationship field that defines what fields are included in the related document(s).Beta Was this translation helpful? Give feedback.
All reactions