TerminusDB 10.1.10: GraphQL Backlinks, Path Queries and Multi-ID Filters

Open inAnthropic

TerminusDB 10.1.10 makes the new GraphQL endpoint much more capable: backlinks, path queries, and filtering by a list of IDs. It was released on 1 December 2022.

What it does

Every link field gets a reverse: if Starship has a pilot field, a Person document answers _pilot_of_Starship with the starships pointing at it. You model your data in one direction and query it in both.

Example: GraphQL
query {
  People(limit: 1) {
    label
    _pilot_of_Starship { label }
  }
}

Why it matters

This is important to ensure that you can traverse the graph in both directions, which is essential for graph-based queries. Making it easy to do so in GraphQL makes it much easier to build graph-based applications. Concretely, this means that you can now query for all the starships that a person has piloted, and all the people that have piloted a starship from either end of the relationship, not only in the forward direction.

Read more: Backlinks in GraphQL

Traverse the graph with path queries

What it does

GraphQL now runs path queries through _path_to_CLASS fields. A path pattern such as film,<film follows edges forward (film) and backward (<film), with repetition and alternation from the full path syntax.

Example: GraphQL
query {
  People {
    _path_to_People(path: "(film,<film){1,2}") { label }
  }
}

Read more: Path queries in GraphQL · Path query syntax

Filter by several IDs, and more

What it does

  • Multi-ID filters. GraphQL queries can match documents against a list of IDs, not only one.
  • Collections over base types. Set, List and Array now work over scalar datatypes, not only classes.
  • Faster diffs. The diff no longer compares long lists exhaustively.
  • Faster deletes. The dangling-reference check was reworked, so deleting linked documents costs less.

Read more: Filter with GraphQL · JSON diff and patch

Fixes

  • TERMINUSDB_LOG_PATH removed; the variable caused crashes.
  • GraphiQL no longer hardcodes localhost:6363.
  • JSON metadata is no longer framed on retrieval.

Upgrade

Example: Bash
docker pull terminusdb/terminusdb-server:v10.1.10

No data migration is needed. Docker install guide · GitHub release


Previous: TerminusDB 10.1.9 · Next: TerminusDB 10.1.11 · TerminusDB 10.1 changelog · Release index

Was this helpful?