How to serch using "for all" condition?

I'm developing an article recommendation system. When a user read article1, article2, ..., and articlen, the system recommend next articles.

I want to do something like the following:

MATCH (a:Article)
WHERE {for all x such that (x:Article)-[:next]->(a:Article),}

How do I write this?

Hi Kobayashi,

You can use Optional Match

optional match (x:Article)-[:next]->(a:Article) set return x

This query is going to set read = true flag for all users. You need to select the articles read by a user and set the flag to true for that user.