Skip to content

Commit 9a584b6

Browse files
committed
Change query/result formatting
1 parent 0d316ca commit 9a584b6

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

README.md

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,25 @@ type ListMetadata {
123123

124124
Here is how you can use the queries and mutations generated for your data, using `Post` as an example:
125125

126-
```graphql
126+
<table>
127+
<tr>
128+
<th>Query / Mutation</th>
129+
<th>Result</th>
130+
</tr>
131+
<tr>
132+
<td>
133+
<pre>
127134
// get a list of entities for a type
128135
{
129136
allPosts {
130137
title
131138
views
132139
}
133140
}
134-
// produces
141+
</pre>
142+
</td>
143+
<td>
144+
<pre>
135145
{
136146
"data": {
137147
"allPosts": [
@@ -140,7 +150,12 @@ Here is how you can use the queries and mutations generated for your data, using
140150
]
141151
}
142152
}
143-
153+
</pre>
154+
</td>
155+
</tr>
156+
<tr>
157+
<td>
158+
<pre>
144159
// get a single entity, by id
145160
{
146161
Post(id: 1) {
@@ -151,7 +166,10 @@ Here is how you can use the queries and mutations generated for your data, using
151166
tag_id
152167
}
153168
}
154-
// produces
169+
</pre>
170+
</td>
171+
<td>
172+
<pre>
155173
{
156174
"data": {
157175
"Post": {
@@ -163,7 +181,10 @@ Here is how you can use the queries and mutations generated for your data, using
163181
}
164182
}
165183
}
166-
```
184+
</pre>
185+
</td>
186+
</tr>
187+
</table>
167188

168189
## Options
169190

0 commit comments

Comments
 (0)