Query by field and related field


I’m having some trouble figuring out how to filter a related document’s ID. Here is what my schema looks like:

type Test {
    name: String!

type UserTest {
    user: ID!,
    test: Test!

I know I can add a query in order to query by UserTest.user, however I’m trying to filter by both UserTest.user and UserTest.test._id.

Is this doable in some way on faunaDB using graphQL?

Thank you

You can do this by using @resolver directive. This will create a UDF, which you can update to use an index with terms = user and Test.