File tree 3 files changed +17
-0
lines changed
Sources/Graphiti/Connection/PagniationArguments
3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -6,4 +6,9 @@ public protocol BackwardPaginatable: Decodable {
6
6
public struct BackwardPaginationArguments : BackwardPaginatable {
7
7
public let last : Int ?
8
8
public let before : String ?
9
+
10
+ public init ( last: Int ? , before: String ? ) {
11
+ self . last = last
12
+ self . before = before
13
+ }
9
14
}
Original file line number Diff line number Diff line change @@ -6,4 +6,9 @@ public protocol ForwardPaginatable: Decodable {
6
6
public struct ForwardPaginationArguments : ForwardPaginatable {
7
7
public let first : Int ?
8
8
public let after : String ?
9
+
10
+ public init ( first: Int ? , after: String ? ) {
11
+ self . first = first
12
+ self . after = after
13
+ }
9
14
}
Original file line number Diff line number Diff line change @@ -6,6 +6,13 @@ public struct PaginationArguments: Paginatable {
6
6
public let after : String ?
7
7
public let before : String ?
8
8
9
+ public init ( first: Int ? = nil , last: Int ? = nil , after: String ? = nil , before: String ? = nil ) {
10
+ self . first = first
11
+ self . last = last
12
+ self . after = after
13
+ self . before = before
14
+ }
15
+
9
16
init ( _ arguments: Paginatable ) {
10
17
first = arguments. first
11
18
last = arguments. last
You can’t perform that action at this time.
0 commit comments