✨Discover storytelling in the AI age with Pixar's Matthew Luhn at Sanity Connect, May 8th—register now

Querying a schema returns an empty array after breaking website into multiple pages.

3 replies
Last updated: Aug 22, 2023
i dont know why am having an empty array after querying a schema, and in my studio i have two items i was working before when my website was a single page but now am breaking it to multiple pages, thats when i started getting this error
Aug 22, 2023, 9:53 AM
Is the name of your document
? If it is the former, your query should be:
*[_type == 'product']{
Aug 22, 2023, 2:36 PM
yes it is, totally skipped my mind. thanks so much is working now
Aug 22, 2023, 2:42 PM
Aug 22, 2023, 2:42 PM

Sanity– build remarkable experiences at scale

Sanity is a modern headless CMS that treats content as data to power your digital business. Free to get started, and pay-as-you-go on all plans.

Was this answer helpful?