Fork me on GitHub

hey there, is there another way to add no-value attributes (like disabled) to HTML tags aside from (dom/div {:disabled ""} ...)? I combed through the book and this seems to be the only way to do so, but honestly it looks kinda… weird so is there a more elegant way to do it?

Björn Ebbinghaus11:10:07

Use: {:disabled true}


It's working now. Thanks.


This might be more of a pathom question, but is the typical way of setting up a resolver where you might not know all the outputs from the api response something like:


Our resolver returns :stuff (not the actual name) which is a hash-map of all the stuff we're not sure will be returned and which we have little control over (just enough control to coerce everything under the stuff keyword)


(pc/defresolver some-resolver
                [__ {:keys [resource/id]}]
                {::pc/input #{:resource/id}
                 ::pc/output [:id]}
                (let [resource (get-resource-by-id id)]


where I could still query other parts of the response like: [{[:resource/id 1] [:id :name]}]


but I wouldn’t get the auto-complete in the fulcro inspect


@njustice definitely a pathom question, they have a separate channel simple_smile

👍 1

anyway, no, the output needs to include :name


if you want to be able to query for :name


hmm.. odd with what I have above I query any keyword in the response of resource


my example query works, and returns {[:resource/id 1] {:name "foo", :id 1}}


(at least it works in fc inspect query)


hmm, might be a feature of a newer version? or i'm misremembering


it would be tricky for me to know all the properties the api will respond with, I.e. a new field is added to the response


I recalled Tony saying something (in the videos) about how ::pc/output helps w/ auto-complete but you can query other fields - but I could also be misremembering


output is used to build indexes in Pathom, so autocomplete won’t work without that info. You can return stuff from a resolver that isn’t advertised, but treat that as an optimization since pathom itself would not know to ask for it from that source. For example, say you have a resolver for fact A that can be retrieved via some ID, but another route can also give A if it is hit. If that route does not advertise it can return A then it will never be asked for A; however, if it is hit first and provides A anyway, then Pathom will detect that is already has A and won’t go looking to resolve it if it then finds that it needs it.


totally could be correct 😅


haha let me see if I can find the part in the videos 😄


When developing locally for a full stack application, how do we tell the client the location of the server? POST 404 (Not Found)


I’ll restate it in case anyone missed it: The current Chrome Store release of Inspect will not work with Fulcro 3.4+. There are pre-release versions of the new Inspect that you can manually install here:


both Chrome and Electron