Is there any way to check the syntax of the query before running it?

(original post was too short)

If you want to see the execution plan but not run the statement, prepend your Cypher statement with EXPLAIN. The statement will always return an empty result and make no changes to the database.

https://neo4j.com/docs/cypher-manual/current/query-tuning/query-options/