@@ -2,7 +2,7 @@ import Foundation
2
2
import GraphQL
3
3
import NIO
4
4
5
- public struct Connection < Node: Encodable > : Encodable {
5
+ public struct Connection < Node> {
6
6
public let edges : [ Edge < Node > ]
7
7
public let pageInfo : PageInfo
8
8
}
@@ -19,7 +19,7 @@ public extension Connection where Node: Identifiable, Node.ID: LosslessStringCon
19
19
}
20
20
21
21
@available ( macOS 10 . 15 , macCatalyst 13 . 0 , iOS 13 . 0 , tvOS 13 , watchOS 6 . 0 , * ) // For Identifiable
22
- public extension EventLoopFuture where Value: Sequence , Value. Element: Encodable & Identifiable ,
22
+ public extension EventLoopFuture where Value: Sequence , Value. Element: Identifiable ,
23
23
Value. Element. ID: LosslessStringConvertible {
24
24
func connection( from arguments: Paginatable ) -> EventLoopFuture < Connection < Value . Element > > {
25
25
connection ( from: arguments, makeCursor: Connection< Value . Element> . cursor)
@@ -36,7 +36,7 @@ Value.Element.ID: LosslessStringConvertible {
36
36
}
37
37
}
38
38
39
- public extension EventLoopFuture where Value: Sequence , Value . Element : Encodable {
39
+ public extension EventLoopFuture where Value: Sequence {
40
40
func connection(
41
41
from arguments: Paginatable ,
42
42
makeCursor: @escaping ( Value . Element ) throws -> String
@@ -66,7 +66,7 @@ public extension EventLoopFuture where Value: Sequence, Value.Element: Encodable
66
66
}
67
67
68
68
@available ( macOS 10 . 15 , macCatalyst 13 . 0 , iOS 13 . 0 , tvOS 13 , watchOS 6 . 0 , * ) // For Identifiable
69
- public extension Sequence where Element: Encodable & Identifiable ,
69
+ public extension Sequence where Element: Identifiable ,
70
70
Element. ID: LosslessStringConvertible {
71
71
func connection( from arguments: Paginatable ) throws -> Connection < Element > {
72
72
try connection ( from: arguments, makeCursor: Connection< Element> . cursor)
@@ -81,7 +81,7 @@ Element.ID: LosslessStringConvertible {
81
81
}
82
82
}
83
83
84
- public extension Sequence where Element : Encodable {
84
+ public extension Sequence {
85
85
func connection(
86
86
from arguments: Paginatable ,
87
87
makeCursor: @escaping ( Element ) throws -> String
@@ -120,7 +120,7 @@ func connect<Node>(
120
120
to elements: [ Node ] ,
121
121
arguments: PaginationArguments ,
122
122
makeCursor: @escaping ( Node ) throws -> String
123
- ) throws -> Connection < Node > where Node : Encodable {
123
+ ) throws -> Connection < Node > {
124
124
let edges = try elements. map { element in
125
125
// swiftformat:disable:next hoistTry
126
126
Edge < Node > ( node: element, cursor: try makeCursor ( element) )
@@ -140,7 +140,7 @@ func connect<Node>(
140
140
)
141
141
}
142
142
143
- func slicingCursor< Node: Encodable > (
143
+ func slicingCursor< Node> (
144
144
edges: [ Edge < Node > ] ,
145
145
arguments: PaginationArguments
146
146
) -> ArraySlice < Edge < Node > > {
@@ -166,7 +166,7 @@ func slicingCursor<Node: Encodable>(
166
166
return edges
167
167
}
168
168
169
- func slicingCount< Node: Encodable > (
169
+ func slicingCount< Node> (
170
170
edges: ArraySlice < Edge < Node > > ,
171
171
arguments: PaginationArguments
172
172
) throws -> [ Edge < Node > ] {
@@ -195,7 +195,7 @@ func slicingCount<Node: Encodable>(
195
195
return Array ( edges)
196
196
}
197
197
198
- func hasPreviousPage< Node: Encodable > (
198
+ func hasPreviousPage< Node> (
199
199
edges: ArraySlice < Edge < Node > > ,
200
200
arguments: PaginationArguments
201
201
) -> Bool {
@@ -206,7 +206,7 @@ func hasPreviousPage<Node: Encodable>(
206
206
return false
207
207
}
208
208
209
- func hasNextPage< Node: Encodable > (
209
+ func hasNextPage< Node> (
210
210
edges: ArraySlice < Edge < Node > > ,
211
211
arguments: PaginationArguments
212
212
) -> Bool {
0 commit comments