MutationEvent
public struct MutationEvent : Model
extension MutationEvent: Sendable
-
Declaration
Swift
public typealias EventIdentifier = String
-
Declaration
Swift
public typealias ModelId = String
-
Declaration
Swift
public let id: EventIdentifier
-
Declaration
Swift
public let modelId: ModelId
-
Declaration
Swift
public var modelName: String
-
Declaration
Swift
public var json: String
-
Declaration
Swift
public var mutationType: String
-
Declaration
Swift
public var createdAt: Temporal.DateTime
-
Declaration
Swift
public var version: Int?
-
Declaration
Swift
public var inProcess: Bool
-
Declaration
Swift
public var graphQLFilterJSON: String?
-
Declaration
Swift
public init(id: EventIdentifier = UUID().uuidString, modelId: ModelId, modelName: String, json: String, mutationType: MutationType, createdAt: Temporal.DateTime = .now(), version: Int? = nil, inProcess: Bool = false, graphQLFilterJSON: String? = nil)
-
Declaration
Swift
public init<M: Model>(model: M, modelSchema: ModelSchema, mutationType: MutationType, version: Int? = nil, graphQLFilterJSON: String? = nil) throws
-
Declaration
Swift
public init<M: Model>(model: M, mutationType: MutationType, version: Int? = nil, graphQLFilterJSON: String? = nil) throws
-
Declaration
Swift
public func decodeModel() throws -> Model
-
Decodes the model instance from the mutation event.
Declaration
Swift
public func decodeModel<M>(as modelType: M.Type) throws -> M where M : Model
-
Declaration
Swift
public init(untypedModel model: Model, mutationType: MutationType, version: Int? = nil) throws
-
Declaration
Swift
public init(untypedModel model: Model, modelName: ModelName, mutationType: MutationType, version: Int? = nil) throws
-
Declaration
Swift
enum MutationType : String, Codable
-
Declaration
Swift
public static let keys: MutationEvent.CodingKeys.Type
-
Declaration
Swift
public static let schema: ModelSchema