Skip to content

Commit

Permalink
Merge pull request #451 from j1mr10rd4n/tutorial-errata
Browse files Browse the repository at this point in the history
Tutorial Errata
  • Loading branch information
hlship authored Sep 17, 2023
2 parents 6ba6065 + 6f253a4 commit aecfc86
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions docs/_examples/tutorial/schema-6.clj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(ns clojure-game-geek.schema
(ns my.clojure-game-geek.schema
"Contains custom resolvers and a function to provide the full schema."
(:require
[clojure.java.io :as io]
Expand All @@ -22,8 +22,8 @@
(defn rate-game
[db]
(fn [_ args _]
(let [{game-id :game_id
member-id :member_id
(let [{game-id :gameId
member-id :memberId
rating :rating} args
game (db/find-game-by-id db game-id)
member (db/find-member-by-id db member-id)]
Expand Down Expand Up @@ -79,11 +79,11 @@
(defn resolver-map
[component]
(let [db (:db component)]
{:query/game-by-id (game-by-id db)
:query/member-by-id (member-by-id db)
:mutation/rate-game (rate-game db)
{:Query/gameById (game-by-id db)
:Query/memberById (member-by-id db)
:Mutation/rateGame (rate-game db)
:BoardGame/designers (board-game-designers db)
:BoardGame/rating-summary (rating-summary db)
:BoardGame/ratingSummary (rating-summary db)
:GameRating/game (game-rating->game db)
:Designer/games (designer-games db)
:Member/ratings (member-ratings db)}))
Expand Down
2 changes: 1 addition & 1 deletion docs/_examples/tutorial/user-1.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(ns user
(:require
[clojure-game-geek.schema :as s]
[my.clojure-game-geek.schema :as s]
[com.walmartlabs.lacinia :as lacinia]))

(def schema (s/load-schema))
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/init-schema.rst
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ In the next chapter, we'll build on this modest start, introducing more schema t


.. [#internal] Internally, `everything` is converted to keywords, so if you prefer
to use symbols everywhere, nothing will break. Conversion to keyboards is one part of the schema compilation
to use symbols everywhere, nothing will break. Conversion to keywords is one part of the schema compilation
process.
.. [#spec] Because the input schema format is so complex, it is `always` validated
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/member-ratings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ We need the server started after the component refactoring::

First, select the rating summary data for a game::

(q "{ gameById(icd: \"1237\") { name ratingSummary { count average }}}")
(q "{ gameById(id: \"1237\") { name ratingSummary { count average }}}")
=> {:data {:gameById {:name "7 Wonders: Duel", :ratingSummary {:count 3, :average 4.333333333333333}}}}


Expand Down

0 comments on commit aecfc86

Please sign in to comment.