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

fetchContentNavigation in DocumentDriven Mode #1786

Open
cooper667 opened this issue Dec 30, 2022 · 2 comments
Open

fetchContentNavigation in DocumentDriven Mode #1786

cooper667 opened this issue Dec 30, 2022 · 2 comments

Comments

@cooper667
Copy link

Environment

  • Operating System: Darwin
  • Node Version: v18.7.0
  • Nuxt Version: 3.0.0
  • Nitro Version: 1.0.0
  • Package Manager: npm@8.18.0
  • Builder: vite
  • User Config: tailwindcss, css, postcss, modules, ssr, content
  • Runtime Modules: @nuxt/content@2.3.0-27871967.30c26e3
  • Build Modules: -

Reproduction

https://stackblitz.com/edit/github-mkcbxm?file=content%2Ffoo%2Ffoo2%2Fbar2.md,nuxt.config.ts,pages%2F[...slug].vue

Describe the bug

When using queryContent in Document Driven mode, the results are as expected, but when I pass this query to fetchContentNavigation the results are different. I thought it might be #1778 but I have the same issue with @nuxt/content-edge

Should this be possible and or am I just querying incorrectly/misunderstanding how it works?

Given:

image

I'd expect fetchContentNavigation(queryContent('/foo/foo2')) to give: [ { title: 'Foo2', _path: '/foo/foo2', children: [ [Object] ] } ]

and the same from fetchContentNavigation(queryContent().where({ _path: { $contains: '/foo/foo2' } }))

Additional context

No response

Logs

No response

Copy link
Member

This is fixed in #1778 and currently available in the edge channel.
Try using edge channel for to solve this issue, the next release might come in two weeks

@cooper667
Copy link
Author

I've updated the Stackblitz to use the edge version. It does change the results, but they still seem incorrect, unless I'm expecting the wrong thing?

@cooper667 cooper667 changed the title fetchContentNavigation iin DocumentDriven Mode fetchContentNavigation in DocumentDriven Mode Dec 31, 2022
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