Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Add max depth config option #15

Open
magicspon opened this issue Dec 23, 2023 · 2 comments
Open

Feature request: Add max depth config option #15

magicspon opened this issue Dec 23, 2023 · 2 comments

Comments

@magicspon
Copy link

It would be good to be able to prevent authors from nesting to far.

It'll also mean i can have a fixed depth in my groq query and be confident that I've got all the required slugs.

@djohalo2
Copy link
Member

Hi @magicspon. With the provided clients from the package the idea is that nesting should not be a limiting factor for resolving a page. We fetch all the pages query time and then client-side or server-side construct the page tree itself to resolve a page by a path.

I think such an option could be possible to support, but I think it should not be necessary. Would you mind sharing a bit more on your setup? Maybe something can be changed there to fix this in another way.

@magicspon
Copy link
Author

The main reason I ask is I'd like to known how deep I need to go to generate urls for links

See this query as an example

https://github.com/magicspon/sanity-next-mono/blob/main/apps/cms/queries/fragments/link.fragment.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants