This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-03
Channels
- # aleph (1)
- # beginners (42)
- # boot (34)
- # cider (157)
- # cljs-dev (12)
- # cljsrn (3)
- # clojure (165)
- # clojure-conj (1)
- # clojure-india (1)
- # clojure-italy (6)
- # clojure-russia (20)
- # clojure-spec (27)
- # clojure-uk (173)
- # clojurescript (116)
- # cursive (30)
- # datomic (87)
- # devcards (1)
- # docs (9)
- # emacs (2)
- # ethereum (2)
- # events (2)
- # fulcro (60)
- # graphql (10)
- # hoplon (2)
- # jobs-rus (6)
- # keechma (1)
- # lein-figwheel (9)
- # leiningen (36)
- # luminus (2)
- # mount (3)
- # off-topic (16)
- # om (14)
- # onyx (12)
- # pedestal (19)
- # portkey (107)
- # re-frame (9)
- # reagent (5)
- # ring (26)
- # shadow-cljs (149)
- # spacemacs (3)
- # sql (6)
Hi i've got a newbie question so apologies in advance. When you sent a mutation which has a input-object inside of it. Do you just reference the input-object as $thing inside of the json you send from the client? If that makes sense?
For example you have : http://graphql.org/learn/schema/#input-types
mutation CreateReviewForEpisode($ep: Episode!, $review: ReviewInput!) {
createReview(episode: $ep, review: $review) {
stars
commentary
}
}
{
"ep": "JEDI",
"review": {
"stars": 5,
"commentary": "This is a great movie!"
}
}
How would you convert that to : http://graphql.org/learn/serving-over-http/#post-request
{
"query": "...",
"operationName": "...",
"variables": { "myVariable": "someValue", ... }
}
I think it would look like this
{
"query":"createReview($ep, $review)",
"operationName":"",
"variables":{
"ep":"JEDI",
"review":{
"stars":5,
"commentary":"This is a great movie!"
}
}
}
{
"query":"query ($ep : Episode, $review: ReviewInput) { createReview(episode: $ep, review: $review) { xyz }}",
"operationName":"",
"variables":{
"ep":"JEDI",
"review":{
"stars":5,
"commentary":"This is a great movie!"
}
}
}