Filter on non-scalar fields or relations (Types)

@rajas sure, I will just give you the current use-case where I’m stuck right now:

type FooCollection {
   foos: [Foo!]!
}

type Foo {
   producedBy: FooProducer!
}

type FooProducer {
  id: String! @id
}

Here I want to query all FooCollection's that don’t have at least one Foo that is produced by FooProducer with id: "123"

So, given these Collections:

{
   foos: [
      {
         producedBy: {
            id: "1234"
         }
      }
   ]
}
{
   foos: [
      {
         producedBy: {
            id: "1234"
         }
      },
      {
         producedBy: {
            id: "123"
         }
      }
   ]
}

I only want to query the first Collection.

Of course you could argue that I could do this on the client. But when the number of collections grows (and it does in my case) I have huge traffic.

Edit:
Hi @abhimanyusinghgaur! You said you will probably work on this last quarter. Is there an update or RFC for this?

2 Likes