Querying by subdocuments
I would like to search by subdocuments. I have an author in the blogPost type and I would like to get all posts by selected author.

Where I can dig in to add a support for this kind of feature?
Hey
Good feature request.
You can add a whereType to the document field: https://github.com/birkir/prime/blob/master/packages/prime-field-document/src/PrimeFieldDocument.ts
Good template is the group field: https://github.com/birkir/prime/blob/master/packages/prime-field-group/src/PrimeFieldGroup.ts
If you need to add something to the where builder: https://github.com/birkir/prime/blob/master/packages/prime-core/src/modules/external/utils/documentWhereBuilder.ts
Let me know if you need help!
Hey @birkir !
We're trying to implement this very feature for our usage of prime (to find articles by a given category, categories being contentTypes of their own, and considering categories could be multiple).
I've managed to define the whereType, but I'm having a hard time listing the fields, and connecting the dots in the query to get the right results, I think I'm missing too many bits of code here and there.
I tried looking at what prismic is doing, but they don't seem to be relying on the same logic (I'm seeing linked documents in their doc), so I'm a little clueless.
Can I ask you for a little more direction? Thanks!