Skip to content

Depth Conditionally #12154

Open
Open
@patelalok1309

Description

@patelalok1309

Describe the Bug.

i have a collection relation with 10 other collections having depth of 1 sending me data of all 10 related collections. you need to implement depth control over query , so i can get depth data conditionally

i hope you understand my problem.

Reproduction Steps

exp

collection with depth of 0
{
id: 1,
name: "asasd",
user: 1,
company: 1,
vendor: 1
}

collection with depth of 1
{
id: 1,
name: "asasd",
user: {
id: 1,
name: "asasd",
},
company: {
id: 1,
name: "asasd",
},
vendor: {
id: 1,
name: "asasd",
}
}

i want only

{
id: 1,
name: "asasd",
user: {
id: 1,
name: "asasd",
},
company: 1,
vendor: 1
}

Environment Info

Payload
Nextjs

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: uiRelated to the admin panel.status: needs-triagePossible bug which hasn't been reproduced yet

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions