GraphQLNullable


ENUM

GraphQLNullable

Swift
1public enum GraphQLNullable<Wrapped>: ExpressibleByNilLiteral

Indicates the presence of a value, supporting both nil and null values.

In GraphQL, explicitly providing a null value for an input value to a field argument is semantically different from not providing a value at all (nil). This enum allows you to distinguish your input values between null and nil.

Cases

none

Swift
1case none

The absence of a value. Functionally equivalent to nil.

null

Swift
1case null

The presence of an explicity null value. Functionally equivalent to NSNull

some(_:)

Swift
1case some(Wrapped)

The presence of a value, stored as Wrapped

Properties

unwrapped

Swift
1@inlinable public var unwrapped: Wrapped?

Methods

init(nilLiteral:)

Swift
1@inlinable public init(nilLiteral: ())
Feedback

Edit on GitHub

Forums