I am trying to get the uid of a node, based on the value of the foreign key.
I have:
My GraphQL Schema (although I need to search in DQL)
type A {
name: String!
...
}
type B {
something: String
apples: [A]
}
So, I have:
query {
q(funct type(B)) @cascade {
p as uid
B.apples @filter(uid(0x321)) {
uid
}
}
So I have the uid of node A, and I need the uid of node B. I do not have an inverse relationship, so I can’t search from the reverse direction, which apparently also means I can’t use uid_in.
- @cascade won’t work due to this bug, where I get more uids than I need, and it may not be the first result that has the correct uid.
- I can’t just use eq(B.apples, uid(0x321)), which seems like it should work…
Surely there is a simpler way to accomplish this?
J