Continous filtering of Graph (make query and continue with filtered graph)


I created a Bipartite Graph using Neo4j. Lets say I have two node types, M and A.
Both node types are defined by an id which is set manually.
A's are for instance attributes describing M's - therefore A's are connected to M's.
Now I want to filter out M's by searching for certain and only show M's which are connected to the A's with that id.

Is it possible to save the queried graph after each iteration and continue with it?
I want to continue working with the filtered graph and not the whole graph in order to avoid having to run the old queries before running the new ones.

I use the Neo4j Python library to connect to my graph. To run the query I use the driver.session().run command to run the cypher commands in python.

Thank you for your help!

Not really sure what you mean by "save the queried graph" and "continue with it".
You want to save a sub-graph in another database...?

Regarding "continue with it" - maybe virtual graphs can help?:

"apoc.graph.fromData([nodes],[relationships],'name',{properties}) = creates a virtual graph object for later processing"