This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-09
Channels
- # aleph (1)
- # announcements (4)
- # asami (6)
- # babashka (45)
- # beginners (19)
- # biff (3)
- # calva (35)
- # cider (4)
- # clojars (5)
- # clojure (117)
- # clojure-art (3)
- # clojure-denmark (2)
- # clojure-europe (89)
- # clojure-gamedev (5)
- # clojure-nl (4)
- # clojure-norway (17)
- # clojure-spec (3)
- # clojure-uk (5)
- # clojurescript (84)
- # conjure (13)
- # datomic (11)
- # emacs (2)
- # figwheel (2)
- # fulcro (16)
- # graphql (5)
- # honeysql (7)
- # introduce-yourself (1)
- # lsp (86)
- # malli (16)
- # music (1)
- # off-topic (2)
- # pathom (14)
- # polylith (28)
- # re-frame (11)
- # reagent (23)
- # releases (1)
- # reveal (19)
- # shadow-cljs (72)
- # spacemacs (13)
- # sql (1)
- # test-check (3)
- # timbre (4)
- # tools-deps (45)
- # vim (18)
the docs mentions consuming graphql, but is there any plan in the future to do the other way around (propose a graphql endpoint?). my understanding is that it may be even "easier" as graphql schemas define strict entry points to the graph through queries and mutations
i experimented with this a bit and would like to go back to it soon. there is an ongoing discussion here https://github.com/wilkerlucio/pathom3/discussions/18 and some beginnings here https://github.com/jmayaalv/graffito/
Hi there, I'm currently using Pathom along with Fulcro and would love to get more into the REPL way of working. One thing that alludes me is how to test out mutations and resolvers against the parser. For example, let's say I have a mutation called login
that takes a username
and password
as its args, what sort of code do I need to write where I can send it to the REPL to see the mutation code in action? Thanks in advance.
the most accurate way to test is to call the parser directly and send your mutation there, this way you make sure you running with all the plugins and etc
if you still want to call the mutation in isolation, you can grab the function via ::pc/mutate
in the mutation, that key has the function with 2 arguments (env and params) to call the mutation directly
I'm assuming you are asking about Pathom 2
in Pathom 3 both mutations and resolvers are custom types that implement IFn
, so you can call those directly
Hey. Yes I'm using pathom2 at the moment (because Fulcro). Seems like calling the parser directly is the way I want since I want to test out the entire thing (i.e. request comes in responses goes out). Thanks a lot 😄
Anyone ever see an error like this?
1. Caused by java.lang.AbstractMethodError
Method
com/wsscode/pathom3/connect/operation/Mutation.applyTo(Lclojure/lang/ISeq;)Ljava/lang/Object;
is abstract
This showed up when I had something like this:
(comment
(def foo (my.app.mutations/some-mutation {:my :env} {:my :input})))
So, calling the mutation directly as a function and trying to bind it to a def
. If I instead used (defn foo [] ...)
and then (def foo2 (foo))
everything worked fine.that's strange, never seen that before
I just got this as well. The def works inside of the function, but not when called directly from repl..
It may have something to do with moun or clojure.tools.namespace.repl. I am using this script https://github.com/fulcrologic/fulcro-template/blob/master/src/dev/development.clj
I think its a reloading thing because it only breaks on a minority of functions, while other ones work perfectly