This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-18
Channels
- # beginners (15)
- # boot (23)
- # cider (8)
- # clara (29)
- # cljs-dev (86)
- # cljsrn (36)
- # clojars (9)
- # clojure (211)
- # clojure-dusseldorf (5)
- # clojure-italy (21)
- # clojure-sg (2)
- # clojure-spec (4)
- # clojure-uk (12)
- # clojurescript (204)
- # cursive (5)
- # data-science (12)
- # datomic (15)
- # dirac (99)
- # emacs (1)
- # events (2)
- # figwheel (1)
- # fulcro (9)
- # graphql (27)
- # hoplon (50)
- # instaparse (9)
- # juxt (61)
- # keechma (6)
- # leiningen (1)
- # luminus (4)
- # lumo (24)
- # off-topic (24)
- # om (16)
- # onyx (17)
- # parinfer (35)
- # pedestal (3)
- # planck (12)
- # protorepl (8)
- # re-frame (15)
- # reagent (22)
- # ring (1)
- # rum (1)
- # spacemacs (3)
- # uncomplicate (4)
- # vim (5)
- # yada (1)
I'm starting with GraphQL and I was wondering if it is possible that given TypeA
, TypeB
and TypeC
to have a response that is like a tuple (in terms of fields) for (TypeA, TypeB, TypeC)
@theikkila Let's say that I have an object School
with fields Address, Name, Capacity
and another object SportField
with fields Length, Width, Seats
I would like to have a query that returns either one of them or both
so you want to do query like this?
{
allSportFields {
id
seats
width
length
}
allSchools {
id
name
address
capacity
}
}
and want it return something like this: https://pastebin.com/8sBrk6rp@abarylko you could have a return type for your query with two fields, school
and sportField
?
if a sports field belongs to a school, I think it makes sense to have it as a relation
if your model is “a school may or may not have a sports field”, then having it as a relation on “School” makes sense
appreciate the help @hmaurer and @theikkila !