I am quite unsure if I correctly understood your situation.
Let me try to phrase what I understood: you have a pipe and a connected database, “clients”. Now, what you want to do, is to query the cards in the pipe which have a certain connected client.
Is this correct?
Then I would suggest to approach from the other way: you can query the database entry (the client) with all its connected cards (meaning, the cards in the pipe and possibly other pipes and databases the client is connected to), and filter the cards to only use the ones from the pipe you want afterwards.
Example query:
query {
table_record(id: <theTableRecordId>) {
title,
id,
status {
id, name
},
record_fields {
name, value, array_value, field { internal_id id }
},
parent_relations {
id, name, repo_items {
edges {
node {
... on Card { id, title }
... on TableRecord { id, title }
}
}
}
},
status {
id, name
}
}
}
Adjust the inner workings (i.e. on Card … fields) to your likings — that’s where you will find the cards of the pipe(s).
You may need to look into pagination if your clients can have more than 50 connected cards.