Fork me on GitHub

Hey I'm developing a application dashboard, and trying to keep api-url as a "first class" My query start with [{[:app/api-url "..."] [{:app/things [:thing/id :thing/stuff]}]}] My first resolver do ::pc/input #{:app/api-url} ::pc/output [{:app/things [:thing/id]}] Then it should call ::pc/input #{:app/api-url :thing/id} ::pc/output [:thing/stuff] But there is no api-url in {:thing/id ..} input There is some helper to "foward" some attributes?


@souenzzo this looks more like an environmet data, do you see :app/api-url is an actual entity in your system, or this just data you need to flow down?


I'm not sure ๐Ÿ˜… I started using it as a environment, associated with the browser session, but then I think "that if I want show a list of things where there is things from 2 instances?"


Im trying to implement a plugin/reader that keep some keys in the new contexts


its ok, but still feels like this should be something you set on the environment, it naturally flows down, and you can change it in the middle of queries using ::p/env on the return of some data if you need to

๐Ÿ‘ 4

we do something similar like that at nubank to deal with shards


this p/env should exists by defaul?


the ::p/env thing may be missing docs (sorry), but in a gist, you do something like this in your resolver return value: {:some/data 123 :deep/info {:more/data "meh" ::p/env (assoc env :app/api-url "new-url")}}


now when it gets to process :deep/info, env will be changed, makes sense?


Can a parser reflect on itself? As in can I query for things like resolvers, output keys, etc?


I imagine the viz uses something like this, but I canโ€™t quite grasp the gist of it