A library to unify data sources through attribute modeling in a seamless graph. Inspired by Pathom.
Merge pull request 'livebook_example' (#11) from livebook_example into main
Update changelog release date
Add livebook example in elixir.


browse  log 



You can also use your local clone with git send-email.


Boto is an attempt to provide features similar to what Pathom provides to Clojure/Clojurescript.

The core concept behind Boto is that you won't have to think of entities anymore, you only need to care about the data that you already have and the data that you need. Boto will take care of trying to retrieve all the data that you need, based on resolvers that you registered. Imagine something like graphql but inside your code, that can leverage any source of information that you can reach.

#Work in progress

Boto is still in development and there is a lot of work to be done for it to be as useful as it can be. There are some considerations on current behaviour:

  • All resolvers are called in a single process, even for nested attributes.
  • Currently queries are optimistic, what means that if Boto can't resolve everything you queried it gonna return everything it was able to retrieve.
  • For this first experiment, I'm not handling errros for resolvers. So it's just expected for the resolvers to return data correctly.

If those behaviors will be kept or changed, it's open to discussion.

#Current Roadmap

  • [i] Document the entire codebase.
  • [i] Full test coverage of complex scenarios and unit tests.
  • [d] Handle resolvers failures, with configurable retries.
  • [d] Failure state when it's not possible to retrieve all data queried.
  • [d] Additional parameter to nested queries.
  • [d] Filters for nested attributes that return N entries.
  • [c] Paralelize resolvers.
  • [c] Cache with TTL for results. [d]: discussion [c]: confirmed [i]: in progress [x]: done


There are two examples available, both in Elixir and Erlang, showing some scenarios of how to use the library. The simple one is the weather resolver, that can get the current temperature forecast for a given ip, if no ip is provided it gonna use your own ip as resource. The elaborated example is the Hacker News api resolver, that can query the public Hacker News api, including nested resources. There is also a livemd file that you can open with Livebook to explore the library usage.

For reference when reading the docs follows a dummy implementation of boto_resolver behaviour.


-export([resolver_init/0, resolve/2]).

resolver_init() ->
    [{resolver1, [{output, [attribute1, attribute2, attribute3]}]},
     {resolver2, [{input, [attribute1]}, {output, [attribute4, attribute5, attribute6]}]}].

resolve(resolver1, Input) ->
    #{attribute1 => 1, attribute2 => 2, attribute3 => 3};
resolve(resolver2, #{attribute1 := Att1}) ->
    case Att1 of
        1 ->
            #{attribute4 => 4, attribute5 => 5, attribute6 => 6},
        2 ->
            #{attribute4 => 8, attribute5 => 10, attribute6 => 12}


defmodule Resolver do
    @behaviour :boto_resolver
    def resolver_init() do
     resolver1: [output: [:attribute1, :attribute2, :attribute3]],
     resolver2: [input: [:attribute1], output: [:attribute4, :attribute5, :attribute6]]
    def resolve(:resolver1, _input) do
        %{attribute1: 1, attribute2: 2, attribute3: 3}
    def resolve(:resolver2, %{attribute1: att}) do
        case att do
            1 -> %{attribute4: 4, attribute5: 5, attribute6: 6}
            2 -> %{attribute4: 8, attribute5: 10, attribute6: 12}


The source of truth for this code is codeberg, provide feedback and join discussion in the issues. A mirror is kept in sourcehut. You're welcomed to interact on both places. Check the code of conduct.