Skip to content

@GraphProperty Annotation

Overrides the on-disk property name for a fragment field, decoupling the stored graph property from the Kotlin/Java field name:

@NodeFragment(labels = ["Chunk"])
data class ChunkNode(
@NodeId val id: String,
@GraphProperty("container_section_id") val containerSectionId: String? = null,
)

The field is containerSectionId everywhere in your code and the DSL (query.containerSectionId), but it’s stored/matched as container_section_id in the graph. The mapping is applied on save, load, the generated query DSL, and index creation. It also feeds model-aware key resolution — field("containerSectionId") and field("container_section_id") both resolve to the on-disk name.