Projection
data class Projection(val include: List<QueryField> = emptyList(), val exclude: List<QueryField> = emptyList())
Data class representing field projection settings for queries.
Projection controls which fields are included in or excluded from query results. Use include to select nodes and their descendants, or exclude to omit them. If both lists are empty, all fields are included. Combining include and exclude follows backend restrictions.
MongoDB single/list/paged queries retain the native _id field by default even when include omits it. It is returned as aggregateId for snapshots and id for event streams. Explicitly exclude that logical field to suppress it; MongoDB permits this ID exclusion alongside include. Elasticsearch does not add an unrequested ID. Cursor queries remove fields fetched only for sorting, including an unrequested ID.