File tree 3 files changed +26
-16
lines changed
3 files changed +26
-16
lines changed Original file line number Diff line number Diff line change 1
1
public struct NoArguments : Decodable {
2
- init ( ) { }
2
+ public init ( ) { }
3
3
}
Original file line number Diff line number Diff line change @@ -3,4 +3,16 @@ public struct PageInfo: Codable {
3
3
public let hasNextPage : Bool
4
4
public let startCursor : String ?
5
5
public let endCursor : String ?
6
+
7
+ public init (
8
+ hasPreviousPage: Bool ,
9
+ hasNextPage: Bool ,
10
+ startCursor: String ? = nil ,
11
+ endCursor: String ? = nil
12
+ ) {
13
+ self . hasPreviousPage = hasPreviousPage
14
+ self . hasNextPage = hasNextPage
15
+ self . startCursor = startCursor
16
+ self . endCursor = endCursor
17
+ }
6
18
}
Original file line number Diff line number Diff line change @@ -22,25 +22,23 @@ class ConnectionTests: XCTestCase {
22
22
}
23
23
}
24
24
25
- let schema = {
26
- try ! Schema < ConnectionTypeResolver , NoContext > {
27
- Type ( Comment . self) {
28
- Field ( " id " , at: \. id)
29
- Field ( " message " , at: \. message)
30
- }
25
+ let schema = try ! Schema < ConnectionTypeResolver , NoContext > {
26
+ Type ( Comment . self) {
27
+ Field ( " id " , at: \. id)
28
+ Field ( " message " , at: \. message)
29
+ }
31
30
32
- ConnectionType ( Comment . self)
31
+ ConnectionType ( Comment . self)
33
32
34
- Query {
35
- Field ( " comments " , at: ConnectionTypeResolver . comments) {
36
- Argument ( " first " , at: \. first)
37
- Argument ( " last " , at: \. last)
38
- Argument ( " after " , at: \. after)
39
- Argument ( " before " , at: \. before)
40
- }
33
+ Query {
34
+ Field ( " comments " , at: ConnectionTypeResolver . comments) {
35
+ Argument ( " first " , at: \. first)
36
+ Argument ( " last " , at: \. last)
37
+ Argument ( " after " , at: \. after)
38
+ Argument ( " before " , at: \. before)
41
39
}
42
40
}
43
- } ( )
41
+ }
44
42
45
43
let eventLoopGroup = MultiThreadedEventLoopGroup ( numberOfThreads: 1 )
46
44
You can’t perform that action at this time.
0 commit comments