schema.edn 1001 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
{:enums   {:mood
           {:values [:good :bad]}}

 :objects
          {:human   {:fields {:id                {:type String}
                              :name              {:type String}
                              :age               {:type Int}
                              :mood              {:type :mood}
                              :moods             {:type (list :mood)}
                              :liste             {:type (list String)}
                              :address           {:type :address}
                              :visited_countries {:type (list :country)}}}

           :address {:fields {:street  {:type String}
                              :city    {:type String}
                              :country {:type :country}}}

           :country {:fields {:id   {:type String}
                              :name {:type String}}}}

 :queries {:human {:type    (non-null :human)
                   :args    {:id {:type ID}}
                   :resolve :human}}}