diff --git a/Sources/GraphZahl/Resolution/OutputResolvable/Implementations/Connection/ConnectionProtocol.swift b/Sources/GraphZahl/Resolution/OutputResolvable/Implementations/Connection/ConnectionProtocol.swift index 82c6ee7..038057b 100644 --- a/Sources/GraphZahl/Resolution/OutputResolvable/Implementations/Connection/ConnectionProtocol.swift +++ b/Sources/GraphZahl/Resolution/OutputResolvable/Implementations/Connection/ConnectionProtocol.swift @@ -104,10 +104,10 @@ extension ConnectionProtocol { context: MutableContext, eventLoop: EventLoopGroup) throws -> EventLoopFuture { - let first = try arguments["first"]?.intValue(converting: true) - let after = try arguments["after"]?.stringValue(converting: true) - let last = try arguments["last"]?.intValue(converting: true) - let before = try arguments["before"]?.stringValue(converting: true) + let first = try Optional.create(from: arguments["first"] ?? .null) + let after = try Optional.create(from: arguments["after"] ?? .null) + let last = try Optional.create(from: arguments["last"] ?? .null) + let before = try Optional.create(from: arguments["before"] ?? .null) let connection = ConnectionWrapper(connection: self, eventLoop: eventLoop, diff --git a/Sources/GraphZahl/Resolution/OutputResolvable/Implementations/Connection/ContextBasedConnection.swift b/Sources/GraphZahl/Resolution/OutputResolvable/Implementations/Connection/ContextBasedConnection.swift index 9c764e5..cde76b7 100644 --- a/Sources/GraphZahl/Resolution/OutputResolvable/Implementations/Connection/ContextBasedConnection.swift +++ b/Sources/GraphZahl/Resolution/OutputResolvable/Implementations/Connection/ContextBasedConnection.swift @@ -122,10 +122,10 @@ extension ContextBasedConnection { context: MutableContext, eventLoop: EventLoopGroup) throws -> EventLoopFuture { - let first = try arguments["first"]?.intValue(converting: true) - let after = try arguments["after"]?.stringValue(converting: true) - let last = try arguments["last"]?.intValue(converting: true) - let before = try arguments["before"]?.stringValue(converting: true) + let first = try Optional.create(from: arguments["first"] ?? .null) + let after = try Optional.create(from: arguments["after"] ?? .null) + let last = try Optional.create(from: arguments["last"] ?? .null) + let before = try Optional.create(from: arguments["before"] ?? .null) let connection = ContextBasedConnectionWrapper(connection: self, eventLoop: eventLoop,