Hi There,
I would like to fetch all documents that have any tag.
The has predicate does not accept document.tags so I am wondering how to do this (without passing the list of all tags since I am on a mobile app and would like to save a request )
Thanks
Priyanka
(Priyanka Maheshwari)
March 28, 2022, 3:10pm
3
Hello @nicolas.braun
Welcome to the Prismic community, and thanks for reaching out to us.
You need to use any
predicate to fetch all documents. Learn more about Query by Tag with Prismic.
Let me know if you have any follow-up questions.
Thanks,
Priyanka
Hello @Priyanka
My usecase is I want all document that have a tag but i do not know which one.
I expected to something like
has('document.tags)
or
at('document.tags', *)
To be more specific i want all tag but one and wanted to mix the above with not(at('document.tags', ['hidden']))
Priyanka
(Priyanka Maheshwari)
March 30, 2022, 2:33pm
5
Hello @nicolas.braun
Unfortunately, this sort of thing is not possible. To retrieve a document with one tab, you need to mention the tag's name.
Thanks,
Priyanka
Thanks I suspected so.
If you feel this is a usecase I'd love to see this added to the roadmap.
Have a great day
Nicolas
Priyanka
(Priyanka Maheshwari)
March 30, 2022, 3:30pm
7
Yeas @nicolas.braun . I think it could be added as a feature request for future improvements.
1 Like