The ECHO schema type to match against.
The ECHO schema (e.g., Collection.Collection, Document.Document).
A matcher that returns Option.some(entity) if the data matches, Option.none() otherwise.
GraphBuilder.createExtension({
id: 'collectionExtension',
match: AppNodeMatcher.whenEchoType(Collection.Collection),
connector: (collection) => {
// `collection` is typed as Collection.Collection
return Effect.succeed(collection.objects.map(...));
},
});
Can be composed directly with whenAll/whenAny/whenNot while preserving the typed entity data in the result.
whenEchoTypeMatches - Returns the node instead of data for legacy composition.
Matches a node whose data is an instance of the given ECHO schema type. Returns the typed entity data (not the node) for direct use in callbacks.
Use this when you need to work directly with the typed ECHO entity in your connector or actions callback.