How to Disable/Enable Expand Child Relationships

I want to disable the Expand Child Relationships programmatically using Cypher. Is there a way to do this.

If you're referring to the graph visualizer, then no. The Cypher query language (and Neo4j) is independent of the visualizer used to visualize the results and interact with them graphically.

That said, we did announce Neo4j 4.0 MR2, a pre-alpha release, and one of its included features is fine grained security and access control. If you didn't want a user to be able to view or traverse certain nodes, or certain properties or relationships, you could configure that, and the Cypher executed would not be able to return or show connected nodes (if READ was denied for those nodes).

Thanks, Andrew. Will check the new release.