File tree 1 file changed +7
-3
lines changed
1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -29,11 +29,15 @@ struct PeopleArguments: GraphPaginatable {
29
29
Use pagination.
30
30
31
31
``` swift
32
- func people (context : Context, arguments : PeopleArguments) -> BasicConnection<Person> {
32
+ func people (context : Context, arguments : PeopleArguments) async throws -> BasicConnection<Person> {
33
33
// Extract offset and count from the input, and query the database.
34
34
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.
37
41
return BasicConnection (
38
42
nodes : people,
39
43
pagination : arguments.pagination ,
You can’t perform that action at this time.
0 commit comments