Skip to content

Commit 493c770

Browse files
authored
Update README.md
1 parent 586f0a4 commit 493c770

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,15 @@ struct PeopleArguments: GraphPaginatable {
2929
Use pagination.
3030

3131
```swift
32-
func people(context: Context, arguments: PeopleArguments) -> BasicConnection<Person> {
32+
func people(context: Context, arguments: PeopleArguments) async throws -> BasicConnection<Person> {
3333
// Extract offset and count from the input, and query the database.
3434
let offsetPagination = arguments.pagination.makeOffsetPagination()
35-
let people = try await Person.all(offset: offsetPagination.offset, count: offsetPagination.count)
36-
// Create a connection data structure converting people into edges with index-based cursors.
35+
let people = try await Person.all(
36+
offset: offsetPagination.offset,
37+
count: offsetPagination.count
38+
)
39+
// Create a connection data structure converting people into edges
40+
// with index-based cursors.
3741
return BasicConnection(
3842
nodes: people,
3943
pagination: arguments.pagination,

0 commit comments

Comments
 (0)