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 the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?