This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-09
Channels
- # announcements (5)
- # beginners (53)
- # clj-kondo (4)
- # cljdoc (3)
- # cljs-dev (11)
- # cljsjs (1)
- # clojure (59)
- # clojure-europe (15)
- # clojure-italy (6)
- # clojure-nl (9)
- # clojure-spec (22)
- # clojure-uk (26)
- # clojurescript (16)
- # clojutre (6)
- # cursive (27)
- # datomic (34)
- # duct (1)
- # figwheel-main (2)
- # fulcro (12)
- # graphql (14)
- # jackdaw (9)
- # jobs (1)
- # kaocha (4)
- # luminus (1)
- # off-topic (11)
- # pathom (1)
- # pedestal (2)
- # re-frame (6)
- # reagent (10)
- # ring-swagger (34)
- # shadow-cljs (47)
- # spacemacs (21)
- # sql (3)
- # tools-deps (37)
- # uncomplicate (11)
- # vim (17)
mutation ($DisplayName: String!, $AuthLink: String) {
onboardCustomer(i: {
fullName: "Bob"
displayName: $DisplayName
authLink: $AuthLink
}) {
commandId
}
}
Is this supposed to work? Seems a reasonable thing to do but it doesn't. Weirdly the error is:
"Exception applying arguments to field 'onboardCustomer': For argument 'i', unknown argument 'fullName'."
Um, no JSON there? That's GraphQL syntax. I didn't include the query variables JSON as it doesn't make a difference.
What is the type of i? Should be an InputObject. Should have a fullName field. Gotta share the details if you expect a response.
4
I think you're also missing commas between eg "bob"
and displayName:
, FWIW.
For this type of thing I tend to write the query like mutation ($x: MyInputObject!) { onboardCustomer(i: $x) { commandId } }
...and then construct the $x
parameter on the Clojure side rather than relying on an object literal in GraphQL syntax
Supplying the whole input object as a query var does work, but that is not the question