Query all docs that have any tags (but one)

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 )


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.


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

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']))

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 I suspected so. :slight_smile:
If you feel this is a usecase I'd love to see this added to the roadmap.

Have a great day


Yeas @nicolas.braun. I think it could be added as a feature request for future improvements.

1 Like