This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-04-23
Channels
- # announcements (3)
- # babashka (68)
- # beginners (297)
- # calva (13)
- # cider (4)
- # clj-kondo (8)
- # cljs-dev (10)
- # cljsrn (26)
- # clojure (100)
- # clojure-europe (4)
- # clojure-germany (1)
- # clojure-italy (9)
- # clojure-nl (5)
- # clojure-spec (9)
- # clojure-uk (41)
- # clojurescript (69)
- # conjure (70)
- # cursive (44)
- # data-science (20)
- # datascript (2)
- # datomic (55)
- # emacs (1)
- # exercism (3)
- # graalvm (2)
- # kaocha (11)
- # leiningen (6)
- # meander (9)
- # mental-health (1)
- # off-topic (73)
- # pathom (6)
- # pedestal (1)
- # re-frame (3)
- # reagent (52)
- # reitit (8)
- # rum (39)
- # shadow-cljs (152)
- # spacemacs (10)
- # tools-deps (28)
- # xtdb (5)
Anyone experienced with Pathom Connect and GraphQL integration? Is there a way to teach it to understand errors (since GQL always return 200), similar to Fulcro's configurable :remote-error?
? I know that if the response boody contains :data nil, :errors [..]
something went wrong and I want to get and e.g. log the errors.
Hm, I see that graphql-resolve
actually extracts both data errors
from the response, just doesn't show the errors to me... Do I need to add something to the query or add some pathom plugin to be able to see the graphql errors?
I have added these to my query :com.wsscode.pathom.connect.graphql2/errors :com.wsscode.pathom/trace
but I got nothing back.
@holyjak You can customize the parser that gets called to inject the errors as you like into your result. Here's an example parser: https://wilkerlucio.github.io/pathom/#CustomResultParsing. Looking at graphql-resolve
, the errors should be available under ::pcg/errors
in env
. I have not done this personally, but I believe it should work looking at the code.
Hi! If you learn something about the graphql integration, especially ::pcg/ident-map
and queries with fields that take 1 or more params, share it! I really struggle here... (The docs worked for me for a top-level field but I struggle for nested ones.)
Thanks! Looking at com.wsscode.pathom.connect.graphql2/error-stamper it seems it should actually propagate these errors to the ::p/errors*
, I wander why it does not work for me... Thanks for the tip, this might help in troubleshooting!
I found it, error-stamper ignores the error because its path does not match with what it expects. Opened an issue: https://github.com/wilkerlucio/pathom/issues/152