👀 Our most exciting product launch yet 🚀 Join us May 8th for Sanity Connect

Document References - No Results for Document Type, Changed from Object

7 replies
Last updated: Mar 15, 2021
I am trying to get a document to refrence other documents of the same type. But I only get "No results" when trying to search for instances of that document type.
The document type was an object up until an hour ago ish, I changed it to a document type because it seems like refrences only works for documents, Then I crated some new instances of that document but cannot find them either.

https://pastebin.com/Fgx3YRP3
Any ideas?
🙂
Mar 15, 2021, 1:38 PM
Are you using the
intl-input
plugin?
Mar 15, 2021, 1:43 PM
no
Mar 15, 2021, 2:06 PM
Alright, then I can’t help you 😕
Mar 15, 2021, 2:07 PM
I would expect the documents that were formerly objects to be a bit tougher to get at, but you mentioned new instances that you can’t find either. What do you get when you query:

*[_type == "successCriterion"]
Are you querying in Vision or some other tool?
Mar 15, 2021, 2:12 PM
I would expect the documents that were formerly objects
I didn’t word that well. They’re still objects and won’t automatically update to documents just because the schema is changed.
Mar 15, 2021, 2:15 PM
Creating new documents from the root of sanity worked, but just adding them via into an array object in sanity did not work. But that is actually fine, this is how I wanted it to work any way. I was just prototyping
Mar 15, 2021, 2:21 PM
thanks
user A
and
user R
❤️
Mar 15, 2021, 2:21 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?