Home

Pathom

Pathom is an open-source data querying and resolution library for Clojure and ClojureScript. It provides a declarative parser that synthesizes data from a set of resolvers, enabling GraphQL-like queries against diverse data sources. Pathom is commonly used with Fulcro to define how a frontend retrieves structured data from a backend.

Core concepts in Pathom include resolvers, the parser, and the environment. A resolver is a small, reusable

How it works: a client issues a query describing the desired data. Pathom analyzes which resolvers can

Usage and ecosystem: Pathom is designed to work server-side with Clojure, often in concert with Fulcro to

function
that
declares
its
input
dependencies
and
the
outputs
it
produces.
In
Pathom
they
are
typically
defined
with
a
defresolver
construct
and
describe
the
keys
they
read
from
the
environment
and
the
keys
they
return.
The
parser
composes
many
resolvers
into
a
plan
that
matches
a
requested
query,
resolving
dependencies
in
the
correct
order.
The
environment
(env)
holds
data
sources
such
as
databases,
services,
or
caches,
and
may
be
augmented
as
resolvers
run.
provide
the
requested
attributes,
builds
a
plan,
executes
resolvers
in
dependency
order
(supporting
asynchronous
operations
when
needed),
and
returns
a
normalized
map
of
results.
It
can
handle
nested
and
related
data
through
resolver
composition
and
“join”
semantics.
streamline
data
fetching
for
UI
layers.
It
is
adaptable
to
various
backends
and
data
sources
via
resolvers,
offering
a
flexible
alternative
to
traditional
REST
or
GraphQL
approaches.