Friday, October 23, 2026|20°C Partly Cloudy
Next edition scheduled
Your Personal Daily Intelligence
Edition 2026-07-12

TECHNOLOGY

Biff.graph: Clojure Library Enables Queryable Graph Data Model

Biff.graph is a Clojure library that lets developers query both database and derived data through a unified graph interface.

By Hacker News · 104d ago · Source: Hacker News

Full article

Biff.graph is a Clojure library that lets developers query both database and derived data through a unified graph interface. The library defines resolvers, which are functions that map input queries to output queries, and allows application code to specify the shape of data needed without detailing how to retrieve it. By splitting the data model into small, independent resolvers, the codebase becomes easier to understand and test as it grows. Biff.graph implements a subset of Pathom's functionality and contains about 600 lines of code, with roughly 200 lines dedicated to query execution. It lacks a query planning step, which may reduce execution efficiency compared to Pathom, but it supports batch resolvers and caching. The library is distributed as com.biffweb.graph with version 2.0.0-rc7 and is intended as a release candidate until other Biff 2 components are released, during which breaking changes may occur. API usage involves defining resolvers with defresolver or com.biffweb.graph/resolver, specifying input and output query shapes, and passing them to com.biffweb.graph/new-ctx to create a query context. Queries are executed via com.biffweb.graph/query, and exceptions include a :biff.graph/trace field to aid debugging. Integration with biff.fx and biff.core is supported, allowing resolvers to be used within effect handlers and to register schema definitions. Guidance recommends one resolver per entity, using the primary key as input and including join keys for foreign references, and enabling batch processing for multiple inputs. The author created the library to provide a simpler entry point for developers unfamiliar with Pathom, aiming to make conceptual learning and debugging more approachable.

Source transparency

Publisher
Hacker News
Reliability
high
Published
7/12/2026, 10:00:20 AM
Retrieved
7/12/2026, 10:00:20 AM
Relevance
80%
Confidence
85%
Read original at Hacker News

Botwin's Morning Wire publishes the full source article for reading convenience. Please visit the publisher for the original presentation and any updates.