← Graph

Resolver

concept 3 connections

Central building block of Pathom: a node in the attribute graph declaring which input attributes are required and which output attributes are produced, plus a function that performs the actual data fetch (e.g. calling the YouTube JSON API). Three root-scope kinds: global singleton resolvers (no input, e.g. 'favorite videos'), identifier-scoped resolvers (input is a specific id), and alias resolvers (a one-to-one mapping between two identifiers, e.g. :youtube.channel/id ↔ SpaceX's channel-id, enabling cross-service joining). Parameters are just part of the input. Composing many small resolvers lets Pathom compute the minimal number of API calls with batching and parallelism, and fall back to alternative paths when one resolver errors.

category
pattern
about
Resolver concept
Resolvers are Pathom's building block demonstrated in the live coding.
About Pathom's resolver-graph execution model.
concept Resolver
related_to
Pathom tool
Resolvers are Pathom's core abstraction.

Provenance

Read by
1 extraction