Skip to content

Commit f479b6a

Browse files
committed
Merge pull request #19 from clentfort/clentfort-section-2-consistent-comma
Update Section 2 -- Consistent use of comma
2 parents b3d955a + f313ba9 commit f479b6a

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

Section 2 -- Language.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Since the top level of a query is a field, it also can be given an alias:
173173
```graphql
174174
{
175175
zuck: user(id: 4) {
176-
id
176+
id,
177177
name
178178
}
179179
}
@@ -283,7 +283,7 @@ will be queried and controlField will not.
283283

284284
```graphql
285285
query myQuery($someTest: Boolean) {
286-
experimentalField @if: $someTest
286+
experimentalField @if: $someTest,
287287
controlField @unless: $someTest
288288
}
289289
```
@@ -303,13 +303,13 @@ as well as friends of some user:
303303
query noFragments {
304304
user(id: 4) {
305305
friends(first: 10) {
306-
id
307-
name
306+
id,
307+
name,
308308
profilePic(size: 50)
309-
}
309+
},
310310
mutualFriends(first: 10) {
311-
id
312-
name
311+
id,
312+
name,
313313
profilePic(size: 50)
314314
}
315315
}
@@ -322,14 +322,14 @@ a parent fragment or query.
322322
```graphql
323323
query withFragments {
324324
user(id: 4) {
325-
friends(first: 10) { ...friendFields }
325+
friends(first: 10) { ...friendFields },
326326
mutualFriends(first: 10) { ...friendFields }
327327
}
328328
}
329329

330330
fragment friendFields on User {
331-
id
332-
name
331+
id,
332+
name,
333333
profilePic(size: 50)
334334
}
335335
```
@@ -345,14 +345,14 @@ For example:
345345
query withNestedFragments
346346
{
347347
user(id: 4) {
348-
friends(first: 10) { ...friendFields }
348+
friends(first: 10) { ...friendFields },
349349
mutualFriends(first: 10) { ...friendFields }
350350
}
351351
}
352352

353353
fragment friendFields on User {
354-
id
355-
name
354+
id,
355+
name,
356356
...standardProfilePic
357357
}
358358

@@ -382,8 +382,8 @@ For example in this query on the Facebook data model:
382382
```graphql
383383
query FragmentTyping {
384384
profiles(handles: ["zuck", "cocacola"]) {
385-
handle
386-
...userFragment
385+
handle,
386+
...userFragment,
387387
...pageFragment
388388
}
389389
}
@@ -435,10 +435,10 @@ same thing using inline fragments.
435435
```graphql
436436
query InlineFragmentTyping {
437437
profiles(handles: ["zuck", "cocacola"]) {
438-
handle
438+
handle,
439439
... on User {
440440
friends { count }
441-
}
441+
},
442442
... on Page {
443443
likers { count }
444444
}

0 commit comments

Comments
 (0)