How to query based on @documentReference?

Hey Ceramic team!
I am trying to build a dApp where I need an account-to-account relation for the “follow user” functionality.
This is my model:

type Follow @ createModel(accountRelation: LIST, description: "Follow details"){
    follower: DID! @ documentAccount
    following: DID! @ accountReference
}

While I am able to query based on the follower field, I want to query based on the following field as well. I referred to this example

Link- https://composedb.js.org/docs/0.4.x/guides/data-modeling/relations#model-to-account

How to query based on @ accountReference?

Hello @tejaswinigurumoorthy !

Thanks for sharing the context above.

Before jumping in, I’d like to first point out this RFC (and corresponding development work currently underway) that might be a helpful reference to the current state and future plan for querying/filtering/ordering by subfield.

As you mentioned, you can currently load lists of documents based on their controlling account. Are you looking for a way to mirror the same behavior for the following field? Basically the equivalent of a SQL WHERE clause on the recipient field?