Closed siccifolium closed 2 months ago
Have you configured https://payloadcms.com/docs/configuration/collections#admin-options the defaultColumns
on your collection to get around this?
I think this is saved in the user preferences as well so you'll need to manually choose to hide some columns if you've already modified this.
Does this resolve your issue?
This issue has been automatically locked. Please open a new issue if this issue persists with any additional detail.
Link to reproduction
No response
Describe the Bug
Hey :)
I have a collection with a field of the type
blocks
. The content we store in thisblocks
field is quite a lot. So when I query this collection, this takes a lot of time. This is only a problem in the dashboard when displaying the list view of this collection.The cause for this seems to be that, whenever we load one page of documents from that collection, the complete documents including the big content of the
blocks
field is loaded.In most cases this however is not needed: If I have a collection where the content is inside a
blocks
field and the collection has also a name field, then in the list view in the admin dashboard we only need the name, however the content of theblocks
field is also queried which makes loading the list very slow. So we are querying data that we don't need at that moment which leads to performance problems.So my question would be is there a way to query/load only specific fields of a collection. What I need is something like
depth=0
which applies toblocks
fields which just delivers the document without the content of theblocks
field. Is there a way to somehow achieve this? Can I overwrite an api endpoint and directly work on the database and use a projection or something like this? Could you guide me into the right direction here?To Reproduce
Create a collection with a blocks field and check the GET Request in the list view in the admin dashboard. For each page every document contains the complete content of the blocks field. As a reference point for the size of our documents: When I query our collection with a page size of 10 then the response is around 60k lines of json where almost most of them belong to the content of the
blocks
field.Payload Version
2.8.2
Adapters and Plugins
No response