I have two tables in DynamoD, one (jobs) is streamed to ElasticSearch.
I have:
jobs:
{
id,
name,
location,
interactions: [interact]
}
interact:
{
id,
user,
job
}
If I now request them via GraphQL, I get a connection of jobs and interact. So something like this: job:
{
id,
name,
interactios: [
{
id,
users
}
...
]
}
I would like to request all jobs that the user has not yet seen. If I do this via GraphQL now, I get an array with 100 jobs, but in every job the user can theoretically be under interactios and the array would be empty after filtering.
Can't I just stream interactions to elasticsearch and start a query:
Give me all jobs in the near AND UserID must not be in the interactions list belongs to this job