TerminusDB 12.0.1 adds _count to GraphQL, fast set operators to WOQL, and field-level unfolding to the schema language. It was released on 15 December 2025.
- GraphQL
_count— count filtered results without returning them. - Field-level
@unfold— control which properties expand when a document is read. - WOQL set operators — high-performance union, intersection and difference.
GraphQL _count
What it does
Every class query in GraphQL now has a _count field that returns the number of documents matching the filter, without transferring the documents themselves.
query { Person(name: "Jane") { _count } }Why it matters
Counting documents is important. It was missing and now it is here. It is not hyper-performance yet, the indices are there but not in use yet. This will be instant in a future release (post an issue if counting fast is important to you).
Read more: GraphQL query reference · How to query with GraphQL
Field-level @unfold
What it does
@unfold can now be applied to a single property, not only at class level. Add "@unfold": true to an Optional, Set, Array, List or Cardinality property to expand that linked document inline on read, while leaving other properties folded — even when the target class is not @unfoldable.
{
"@id": "Order",
"@type": "Class",
"customer": { "@type": "Optional", "@class": "Customer", "@unfold": true },
"product": { "@type": "Optional", "@class": "Product" }
}Reading an Order returns customer unfolded inline and product as an ID reference. Cycles are detected at runtime: a recurring document comes back as its ID instead of recursing forever.
Why it matters
You can shape each read to the client that consumes it — expand the fields a UI needs inline and keep the rest as references. Responses get smaller, extra round trips disappear, and cyclic graphs stay safe because recursion stops at the first repeat.
Read more: @unfold in the schema guide
WOQL set operators
New high-performance WOQL predicates — union, intersection and difference — combine or subtract whole result sets in one step instead of nested or/not constructs.
intersection(query_a, query_b)Read more: WOQL Union · WOQL Intersection · WOQL Difference
Fixes
sys:JSONnumeric values now cast correctly to other numeric types- Fixed nested subdocument ID generation
- Fixed stray subdocument residue during deletion (a 12.0.0 regression)
- Fixed Foreign type schema validation and inclusion in the schema graph
- Aligned
@unfoldwith@unfoldableand prevented possible WOQL unfolding issues - Reduced server startup delay; re-enabled the in-memory server for testing
Upgrade
docker pull terminusdb/terminusdb-server:v12.0.1No data migration is needed. Docker install guide · Full changelog on GitHub
Previous: TerminusDB 12.0.0: Precise Numbers and Free-Form JSON · Next: TerminusDB 12.0.4: Fast Range Queries and Interval Algebra · TerminusDB 12.0 changelog · Release index