Company
Date Published
Author
Gemma Lamont
Word count
1573
Language
English
Hacker News points
None

Summary

Cypher Dynamism is a new feature in Neo4j that allows developers to create more secure, readable, and maintainable Cypher queries by introducing dynamic labels, types, and properties. This feature mitigates Cypher injection risks while promoting concise code. With this update, users can now set node labels and relationship types dynamically using expressions that evaluate to non-null strings or lists of strings, and set properties with dynamic keys. The new feature also simplifies data loading into the database and allows for easier migration away from APOC plugins. However, it's essential to note that dynamic values may impact query performance due to the Cypher Planner's limitations in planning queries with dynamic labels. As a best practice, users are advised to use regular static syntax when possible to help the planner build efficient query plans. The feature is designed to promote simpler and more secure queries, making it easier for developers to work with Neo4j databases.