đź‘‹ Next.js Conf 2024: Come build, party, run, and connect with us! See all events

Trouble shooting empty array response from groq queries in app development

4 replies
Last updated: Apr 17, 2020
I built my groq queries in vision and I am getting the data I need. But when I put them into my app, I am getting back an empty array. No error messages.
This is in development and I did add localhost to the CORS part of the dashboard.

How can I trouble shoot this further?
Apr 17, 2020, 7:27 PM
Sounds like you have a private dataset?
Apr 17, 2020, 7:34 PM
Ahhh... I do. I have a token for this set... I'm assuming I can put that into the client constructor
Apr 17, 2020, 7:37 PM
Thanks... found it in the docs too! Apprciate the quick help!
Apr 17, 2020, 7:38 PM
Just be careful with that token :)
Apr 17, 2020, 7:53 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?