Hi! I'm a bit stuck with a common situation. Currently i need to use the _allDocuments query to pick all Documents tagged by the default prismic tag system that contains a specific tag, but i also need to use the where field to filter those documents by a common field that all the custom types have (a custom start_date field). But, i see that i can't use the where field in the _allDocuments query, so basically, as i see, i can't implement a typical filter page. I'm i missing something? Thanks a lot
Hello @dev.wildtrek
Thanks for reaching out to us.
I found two issues in your query:
- To Query by Tags, you need to use the
tags_in
argument, not the type_in argument. - If you filter it by one tag, then use only the
tag
argument without using the array.
I have two questions:
- Did you add
start_date
field later after publishing the doc? If so, Can you republish the doc and refresh the graphql page to query it again. -
where
argument field name isstart_date
orstart_date_after
. It's conflicting in your description and code snippets. Could you check this too?
If both cases don't solve your issue, I need your Prismi repo URL to solve your issue. You can send me a personal message.
Thanks,
Priyanka