This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-08-29
Channels
- # aleph (5)
- # announcements (2)
- # bangalore-clj (2)
- # beginners (52)
- # cider (10)
- # cljsrn (1)
- # clojure (160)
- # clojure-dev (24)
- # clojure-europe (3)
- # clojure-france (1)
- # clojure-india (1)
- # clojure-italy (3)
- # clojure-nl (6)
- # clojure-spec (13)
- # clojure-uk (51)
- # clojurescript (45)
- # code-reviews (1)
- # core-async (41)
- # cursive (41)
- # datomic (17)
- # emacs (37)
- # fulcro (42)
- # graphql (7)
- # joker (4)
- # music (1)
- # nrepl (2)
- # off-topic (21)
- # pathom (19)
- # pedestal (12)
- # re-frame (48)
- # reitit (6)
- # rewrite-clj (8)
- # shadow-cljs (41)
- # specter (6)
- # sql (21)
- # tools-deps (8)
- # vim (7)
- # xtdb (27)
hey guys, I'm using this
(def userCredentialsResp [:attributes
:blockedUsers
:category
:citizenId
:city
:countryCode
:diary
:email
:firebaseUserToken
:hourly
:industryList
{:languageList [:languageId
:proficiency]}
{:skillList [:label
:skillId]}
:name
:password
:phone
:positionId
:profileImage
:stateId
:summary
:title
:userId])
(pcgql/query->graphql `[{(inputCredentials {:userId "6262818231812096"
:name "DV"
:title "C"
:category "technology"
:phone "+55660"})
~userCredentialsResp}] {})
and its's returning me a query with this character \\u200b
like this:
"mutation {\n inputCredentials(category: \"technology\", phone: \"+55660\", name: \"DV\", title: \"C\", userId: \"6262818231812096\\u200b\") {\n attributes\n blockedUsers\n category\n citizenId\n city\n countryCode\n diary\n email\n firebaseUserToken\n hourly\n industryList\n languageList {\n languageId\n proficiency\n }\n skillList {\n label\n skillId\n }\n name\n password\n phone\n positionId\n profileImage\n stateId\n summary\n title\n userId\n }\n}\n"
I can't think of any reason why pathom would add that, can you double check if this string doesn't have some hidden character? maybe rewrite just that string and check
I've rewrote it many times =< dunno why... for now I've just used #(clojure.string/replace % #"\\u200b" "")
it's very strange, I'll see if another case will appear, thanks
if you can get a consistent repro of the bug, please open an issue so I can look later
thanks!
anyone knows why this character is appearing?
is there a way to elide the mutation name from the parse result using the mutate-async
mutation fn? is that even advisable? trying to get pathom to hook into fulcro 3's error handling mechanism and trigger an error-action
for my mutation. wondering what peoples’ setups look like for that
this should work as same as in F2, its not desirable to remove it from the results, Fulcro expects the error details to be inside of it
I hear that. I guess what I’m struggling with is that the error is boxed up inside of a map like {my-mutation-name {::pc/reader-error ...}}
. wondering if there’s any easier way on the api handler side or on the f3 side to determine that it’s an error from the parser besides doing something like (contains? (first (vals parse-result)) ::pathom/reader-error)
per the docs here it seems like there should be a ::p/errors
key at the top level of the parse result map, but that doesn’t seem to be the case for an error thrown by ex-info
. maybe I’m misreading or missing something in my env beyond the error-handler-plugin
?
you need to set ::p/process-error
in your environment, this is a fn that receives [env error]
, the return of it will be the value there in case of errors
makes sense?
yep, absolutely. really appreciate the help and all the work you put into this. really a phenomenal library
currently its documentation only (it shows up in the Index Explorer). but the name is official and consistent, so you can implement things on top of that (maybe a plugin that does clojure.spec validations using it?), Pathom may add features on top of that, but right now is just official name and doc