Fork me on GitHub

After following the instructions to build Pathom-Viz i get this when running the app: main.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND


this is on macos. kind of clueless what am i doing wrong, any pointers?

Jakub Holý (HolyJak)10:04:40

Hello! What is the difference between and (except the look & feel)? The former seems also to cover v2.2.0 based on the fact it has the section ""? I would like to convert it into PDF for reading on my Kindle and thus the single-page /pathom/ is much better than the multipage /v2/. Thanks!

Jakub Holý (HolyJak)13:04:20

I am looking at, do I understand correctly that the only place that binds the defined GraphQL endpoint (`github-gql`) is when it is used to load indexes ( I guess Pathom Connect then has all info necessary in the indexes, so it can call the GQL endpoint when necessary? And, BTW, is it possible to configure the endpoint more? In particular I need to include a header with an API token. I guess I just add ::p.http/headers {"x-api-key" "123"} to the endpoint's def , right? But what if the header is dynamic and depends on some other stuff from the environment? (For some queries, I also need to include the id of the user making the request; but it is expected to be provided as a header, not a query param.)

Chris O’Donnell13:04:43

@holyjak Your understanding is correct about loading indices. I've added a bearer token dynamically to requests using a parser plugin like this:

(def auth-plugin
   (fn [parser]
     (fn [env tx]
         (assoc-in env [::p.http/headers :authorization] (str "Bearer " (get-token)))

❤️ 8
Jakub Holý (HolyJak)14:04:31

Awesome! Thanks a lot!

👍 4

hello, totally newbie with pathom here. i am trying to setup worskpaces with a pathom-viz card. is there any example/doc to follow when pathom is running on clj? example here: passes a parser, but how to pass a parser when pathom is running on clj and not cljs?


am i correct assuming that it should be something similar to standalone ?