Skip to content

Commit 27b6a24

Browse files
authored
Update README.md
1 parent 74a68cb commit 27b6a24

File tree

1 file changed

+41
-42
lines changed

1 file changed

+41
-42
lines changed

README.md

Lines changed: 41 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ var results = await "https://graphql-star-wars.azurewebsites.net/api/graphql"
238238
query ($first: Int, $after: String) {
239239
characters(first: $first, after: $after) {
240240
totalCount
241-
pageInfo {
241+
pageInfo {
242242
hasNextPage
243243
hasPreviousPage
244244
startCursor
@@ -247,7 +247,7 @@ var results = await "https://graphql-star-wars.azurewebsites.net/api/graphql"
247247
nodes {
248248
personalIdentifier
249249
name
250-
height
250+
height
251251
}
252252
}
253253
}
@@ -466,18 +466,18 @@ public class StarWarsCharacter
466466
var results = await "https://graphql-star-wars.azurewebsites.net/api/graphql"
467467
.WithGraphQLQuery(@"
468468
query ($ids: [Int!], $friendsCount: Int!) {
469-
charactersById(ids: $ids) {
470-
friends(first: $friendsCount) {
471-
nodes {
472-
friends(first: $friendsCount) {
473-
nodes {
474-
name
475-
personalIdentifier
476-
}
477-
}
478-
}
469+
charactersById(ids: $ids) {
470+
friends(first: $friendsCount) {
471+
nodes {
472+
friends(first: $friendsCount) {
473+
nodes {
474+
name
475+
personalIdentifier
476+
}
479477
}
478+
}
480479
}
480+
}
481481
}
482482
")
483483
.SetGraphQLVariables(new { ids = new[] { 1000, 2001 }, friendsCount = 3 })
@@ -516,17 +516,17 @@ var json = await "https://graphql-star-wars.azurewebsites.net/api/graphql"
516516
.WithGraphQLQuery(@"
517517
mutation ($newCharacter: Character) {
518518
characterCreateOrUpdate(input: $newCharacter) {
519-
result {
519+
result {
520520
personalIdentifier
521-
name
522-
}
523-
errors {
524-
... on Error {
525-
errorCode
526-
message
527-
}
528-
}
529-
}
521+
name
522+
}
523+
errors {
524+
... on Error {
525+
errorCode
526+
message
527+
}
528+
}
529+
}
530530
}
531531
")
532532
.SetGraphQLVariables(new { newCharacter: newCharacterModel })
@@ -550,17 +550,16 @@ Here's an example of a batch query that uses an alias to run multiple queries an
550550
var batchResults = await "https://graphql-star-wars.azurewebsites.net/api/graphql"
551551
.WithGraphQLQuery(@"
552552
query ($first: Int) {
553-
characters(first: $first) {
553+
characters(first: $first) {
554554
nodes {
555-
personalIdentifier
556-
name
557-
height
558-
}
559-
}
560-
561-
charactersCount: characters {
555+
personalIdentifier
556+
name
557+
height
558+
}
559+
}
560+
charactersCount: characters {
562561
totalCount
563-
}
562+
}
564563
}
565564
")
566565
.SetGraphQLVariables(new { first = 2 })
@@ -591,11 +590,11 @@ var jsonObject = await "https://graphql-star-wars.azurewebsites.net/api/graphql"
591590
query ($first: Int) {
592591
characters(first: $first) {
593592
nodes {
594-
personalIdentifier
595-
name
596-
height
597-
}
598-
}
593+
personalIdentifier
594+
name
595+
height
596+
}
597+
}
599598
}
600599
")
601600
.SetGraphQLVariables(new { first = 2 })
@@ -608,11 +607,11 @@ var jsonObject = await "https://graphql-star-wars.azurewebsites.net/api/graphql"
608607
query ($first: Int) {
609608
characters(first: $first) {
610609
nodes {
611-
personalIdentifier
612-
name
613-
height
614-
}
615-
}
610+
personalIdentifier
611+
name
612+
height
613+
}
614+
}
616615
}
617616
")
618617
.SetGraphQLVariables(new { first = 2 })
@@ -631,7 +630,7 @@ try
631630
var json = await "https://graphql-star-wars.azurewebsites.net/api/graphql"
632631
.WithGraphQLQuery(@"
633632
query (BAD_REQUEST) {
634-
MALFORMED QUERY
633+
MALFORMED QUERY
635634
}
636635
")
637636
.PostGraphQLQueryAsync()

0 commit comments

Comments
 (0)