Query Many-to-many relationship

Hi,
I’ve got a many-to-many relationship set up as per the example:
type User {
name: String!
drives: [Car!] @relation
}

type Car {
  plate: String!
  drivers: [User!] @relation
}

I want to query for all cars that have been driven all drivers in a list of drivers. I have no idea where to start?

I do not think @relation directive can achieve it. You will have to use @resolver directive, define a User Defined Function (UDF) which would accept an argument of list of drivers, has paginated:true as you want to see the list of cars to be returned. This UDF could internally check for the condition cars driven by all drivers in the given list of drivers using user created Indexes.

Here’s a link to some thoughts I had about GraphQL @resolver