3 April, 2024
These changes have been released with version 0.382
of the CLI.
New built-in type: Markdown
The generated OpenAPI schema for this new field type will be of type: "string"
and include format: "markdown"
. This allows clients to automatically handle fields of this type in a specific way, for example, rendering forms with rich-text editors for a more immersive experience.
model Post {
fields {
title Text
description Markdown?
}
}
Previous state in subscriber's event payload
Up until now, the full model's data has been included in the event object's data
field passed to subscriber functions. We have added a new field named previousData
which captures the model's data before the mutation occurred that caused the event. The definition below is an example of what the event payload might look like.
export interface MemberCreatedEvent = {
// The unique name of this event, as a string literal
eventName: "member.created"
// The timestamp at which the event occured
occurredAt: DateTime,
// The identity that triggered the event, if any
identityId?: string,
// The targeted model which was mutated
target: {
// The id of the mutated model
id: string,
// The name of the model type
type: "Member",
// The model's data at the time of the event
data: Member
// The model's data before the mutation which caused this event
previousData: Member
}
}
For more information please refer to the events documentation.
Fixes and Improvements
We've also released some other fixes and improvements (opens in a new tab) to the CLI and VS Code extension.
For any issues or feedback, please visit the support channel on our community Discord (opens in a new tab) or contact us at help@keel.so.
Thank you for using Keel!