You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/FSharp.Data.GraphQL.Server.Relay/Connections.fs
+11-7Lines changed: 11 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -114,6 +114,8 @@ type SliceInfo<'Cursor> =
114
114
115
115
[<AutoOpen>]
116
116
moduleDefinitions =
117
+
let inlineprivatenullableOutput(innerDef :#OutputDef<'Val>):OutputDef<'Valoption>=
118
+
Nullable (innerDef :> OutputDef<'Val>)
117
119
118
120
/// <summary>
119
121
/// Active pattern that extracts Relay pagination arguments from a GraphQL field context.
@@ -159,13 +161,13 @@ module Definitions =
159
161
)
160
162
Define.AsyncField (
161
163
"startCursor",
162
-
Nullable StringType,
164
+
nullableOutput StringType,
163
165
"When paginating backwards, the cursor to continue.",
164
166
fun _ pageInfo -> pageInfo.StartCursor
165
167
)
166
168
Define.AsyncField (
167
169
"endCursor",
168
-
Nullable StringType,
170
+
nullableOutput StringType,
169
171
"When paginating forwards, the cursor to continue.",
170
172
fun _ pageInfo -> pageInfo.EndCursor
171
173
)
@@ -225,7 +227,7 @@ module Definitions =
225
227
fields =[
226
228
Define.AsyncField (
227
229
"totalCount",
228
-
Nullable IntType,
230
+
nullableOutput IntType,
229
231
"""A count of the total number of objects in this connection, ignoring pagination. This allows a client to fetch the first five objects by passing \"5\" as the argument to `first`, then fetch the total count so it could display \"5 of 83\", for example. In cases where we employ infinite scrolling or don't have an exact count of entries, this field will return `null`.""",
230
232
fun _ conn -> conn.TotalCount
231
233
)
@@ -276,6 +278,8 @@ module Edge =
276
278
277
279
[<RequireQualifiedAccess>]
278
280
moduleConnection =
281
+
let inlineprivatenullableInput(innerDef :#InputDef<'Val>):InputDef<'Valoption>=
282
+
Nullable (innerDef :> InputDef<'Val>)
279
283
280
284
/// <summary>
281
285
/// Transforms a <seecref="Connection{T}"/> into a <seecref="Connection{U}"/>
@@ -304,8 +308,8 @@ module Connection =
304
308
/// <seealsocref="backwardArgs"/>
305
309
/// <seealsocref="allArgs"/>
306
310
letforwardArgs=
307
-
[ Define.Input ("first",Nullable IntType)
308
-
Define.Input ("after",Nullable StringType)]
311
+
[ Define.Input ("first",nullableInput IntType)
312
+
Define.Input ("after",nullableInput StringType)]
309
313
310
314
/// <summary>
311
315
/// Argument definitions for backward pagination ("last" and "before").
@@ -314,8 +318,8 @@ module Connection =
314
318
/// <seealsocref="forwardArgs"/>
315
319
/// <seealsocref="allArgs"/>
316
320
letbackwardArgs=
317
-
[ Define.Input ("last",Nullable IntType)
318
-
Define.Input ("before",Nullable StringType)]
321
+
[ Define.Input ("last",nullableInput IntType)
322
+
Define.Input ("before",nullableInput StringType)]
319
323
320
324
/// <summary>
321
325
/// Complete set of argument definitions for bidirectional pagination.
0 commit comments