fulcro

Book: http://book.fulcrologic.com, Community Resources: https://fulcro-community.github.io/, RAD book at http://book.fulcrologic.com/RAD.html
wilkerlucio 2021-06-20T15:53:50.216Z

hello, I'm playing with the new Fulcro raw things, one thing I notice is that (rc/component-instance? (rc/nc [:foo])) returns false because hte result of rc/nc doens't contain fulcro$isComponent true, should it be there?

tony.kay 2021-06-20T17:06:34.216500Z

actually no. nc is a component class, not an instance

tony.kay 2021-06-20T17:20:01.217Z

however, your question caused me to find a bug 😄

tony.kay 2021-06-20T17:28:23.217600Z

Fulcro 3.5.0-RC2 is on clojars. Fixes a bug in nc where nested queries were not generated correctly.

Timofey Sitnikov 2021-06-20T20:37:31.221900Z

I am working with Fulcro Template and on the server, there is a https://github.com/fulcrologic/fulcro-template/blob/a169b0ab50c0b390ac5efe24e307d371ec2f2bd3/src/main/app/model/session.clj#L32 , How can I execute it in REPL? I know that on the client side I can simply (comp/transact! SPA [(login {:username "john" :password "mysecurepassword"})])). How can I do that on the server side. It looks like on the client side the SPA contains the env, what do I use in place of SPA on the server side.

Björn Ebbinghaus 2021-06-21T14:05:46.227200Z

@timofey.sitnikov I have some parser integrations tests, If you want to look at some examples. https://github.com/hhucn/decide3/blob/master/src/test/decide/models/process_test.clj#L279

Björn Ebbinghaus 2021-06-21T14:06:07.227500Z

(specification "Moderator priviliges"
  (let [parser (pathom/build-parser {} *conn*)
        parser-with-alex-session (partial parser {:ring/request {:session {:id #uuid"000aa0e2-e4d6-463d-ae7c-46765e13a31b"}}})]
    (behavior "Only a moderator can"
      (behavior "add new moderators"
        (assertions
          (parser-with-alex-session
            [`(process.mutations/add-moderator
                {::process/slug "test-decision"
                 ::user/email "Marc"})])
          =check=>
          (_/embeds?*
            {`process.mutations/add-moderator
             {:com.fulcrologic.rad.pathom/errors
              {:message "Need moderation role for this operation"}}}))))))

1
❤️ 1
Timofey Sitnikov 2021-06-22T11:03:26.238Z

It will take a few days to chew thorough this, but looks interesting. I am just starting to get into testing.