amazon web services – Filter main table by sub / sub field relation
Seeing this query:
query ListPosts(
$filter: ModelPostFilterInput
$limit: Int
$nextToken: String
) {
listPosts(filter: $filter, limit: $limit, nextToken: $nextToken) {
items {
id
title
description
personID
media {
items {
id
type
postID
taggedPersons{
items {
id
personID
mediaID
}
nextToken
}
}
nextToken
}
}
}
}
I would like to filter the posts:
- Where the owner has a personID {filter:{personID:{eq: $personID}}}
- OR where the person is in the taggedPersons list
Getting the post by this sub sub relation I can’t figure out. How would I do this?
Read more here: Source link