This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-12
Channels
- # adventofcode (1)
- # announcements (1)
- # atom-editor (4)
- # aws (4)
- # babashka (7)
- # beginners (46)
- # biff (14)
- # calva (11)
- # cljdoc (2)
- # clojure (78)
- # clojure-art (1)
- # clojure-austin (1)
- # clojure-europe (50)
- # clojure-nl (2)
- # clojure-norway (22)
- # clojure-spec (2)
- # clojure-uk (2)
- # clojurescript (72)
- # conjure (6)
- # core-typed (6)
- # eastwood (4)
- # events (1)
- # figwheel-main (11)
- # fulcro (1)
- # guix (1)
- # helix (13)
- # jobs (2)
- # jobs-discuss (4)
- # kaocha (2)
- # malli (5)
- # off-topic (7)
- # pathom (22)
- # pedestal (9)
- # re-frame (29)
- # reagent (7)
- # releases (2)
- # remote-jobs (1)
- # rewrite-clj (12)
- # shadow-cljs (44)
- # sql (13)
- # squint (2)
- # xtdb (17)
@lilactown try this, first add a deps alias:
{:guardrails-stubs
{:override-deps
{com.fulcrologic/guardrails {:git/url ""
:git/sha "063451653a8ab656b436b0258cdb438e7ffac4c6"}}}}
The do the advanced compilation with it, it should remove expound and clojure spec, this is my test result here:you should be able to use ns-alias for the release build to eliminate those https://github.com/fulcrologic/guardrails#dead-code-elimination
{:build-options
{:ns-aliases
{com.fulcrologic.guardrails.core com.fulcrologic.guardrails.noop}}
but yea, would be nice not to have to do that@lilactown this actually looks the best option to me
Hello Pathom and Wilker Lucio, congrats for this great project. Sorry for disturbing your vacations.
I think I encountered an issue if I am not mistaken (it's my first experience with the tool) when trying to run a graphql resolver in the browser. I set up a little project to demonstrate the issue: https://github.com/revert-finance/pathom-graphql-test
I am getting an exception when trying to run what I think is a valid query https://github.com/revert-finance/pathom-graphql-test/blob/main/src/revert/pathom_graphql_test.cljs#L53
This is the message: Graph execution failed: Required attributes missing: [:univ3.Token/symbol] at path [:staker.Query/incentives 0]
Things to notice:
ā¢ This query also fails https://github.com/revert-finance/pathom-graphql-test/blob/main/src/revert/pathom_graphql_test.cljs#L70 with Graph execution failed: Required attributes missing: [:staker.Incentive/contract] at path []
ā¢ Same queries work in clojure https://github.com/revert-finance/pathom-graphql-test/blob/main/src/revert/pathom_graphql_test.clj (is it a setup issue of my project in cljs?)
Thanks in advance
thanks for the report Gonzalo! I'll have a look at it, one question, when you say it runs on clj, you mean you have the same setup, both in clj and cljs, and it works in one but not the other? or are you requesting your graph made in CLJ from CLJS?
Hi Lucio, thanks for the quick reply. I want to run the resolver directly in the browser that's my goal without any backend dependency. What I did to test my setup and check I was not messing things up is to run the same resolver in clj, with the conclusion that in clj works but not in cljs. You can see the two files in here https://github.com/revert-finance/pathom-graphql-test/tree/main/src/revert
thanks, thats fascinating, I like to dig on it and understand whats going on š
thanks for making the repro, it really helps
will I be able to hit those apis? are they public/free?
yes they are public
awesome
Thank you!
found, was an oversight around dealing with async responses when starting the query from an ident request, bump pathom3-graphql to 2022.09.12-alpha
and you should be fine ;)_
I also notice you are using an outdated version of Pathom 3
I recommend that you bump to latest 2022.08.29-alpha
also, since you are in some dynamic resolver land, you may be able to take advantage of some experimental optimizations in the planner, if you see that Pathom is making more requests than you expect, try setting :com.wsscode.pathom3.connect.planner/experimental-branch-optimizations true
in your env, to try the experimental optimizations
amazing thanks, will definitely play with it