Skip to content

Commit 9d62a0e

Browse files
committed
chore: finish reordering
1 parent bfe8b30 commit 9d62a0e

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

documentation/tutorials/getting-started-with-graphql.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -161,12 +161,14 @@ defmodule Helpdesk.Support do
161161
162162
...
163163
graphql do
164-
# equivalent queries and mutations, but the first argument
165-
# is the resource because the domain can define queries for
166-
# any of its resources
167164
queries do
165+
# create a field called `get_ticket` that uses the `read` read action to fetch a single ticke
168166
get Helpdesk.Support.Ticket, :get_ticket, :read
167+
168+
# create a field called `most_important_ticket` that uses the `most_important` read action to fetch a single record
169169
read_one Helpdesk.Support.Ticket, :most_important_ticket, :most_important
170+
171+
# create a field called `list_tickets` that uses the `read` read action to fetch a list of tickets
170172
list Helpdesk.Support.Ticket, :list_tickets, :read
171173
end
172174
@@ -192,20 +194,12 @@ defmodule Helpdesk.Support.Ticket do
192194
type :ticket
193195
194196
queries do
195-
# Examples
196-
197-
# create a field called `get_ticket` that uses the `read` read action to fetch a single ticke
198197
get :get_ticket, :read
199-
# create a field called `most_important_ticket` that uses the `most_important` read action to fetch a single record
200198
read_one :most_important_ticket, :most_important
201-
202-
# create a field called `list_tickets` that uses the `read` read action to fetch a list of tickets
203199
list :list_tickets, :read
204200
end
205201
206202
mutations do
207-
# Examples
208-
209203
create :create_ticket, :create
210204
update :update_ticket, :update
211205
destroy :destroy_ticket, :destroy

0 commit comments

Comments
 (0)