Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix EntityMutationTrigger docblocks #216

Merged
merged 1 commit into from
Dec 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions packages/entity/src/EntityMutationTriggerConfiguration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,8 @@ export default interface EntityMutationTriggerConfiguration<
afterAll?: EntityMutationTrigger<TFields, TID, TViewerContext, TEntity, TSelectedFields>[];

/**
* Trigger set that runs after committing the transaction unless one is supplied
* after any mutation (create, update, delete). If the call to the mutation is wrapped in a transaction,
* this too will be within the transaction.
* Trigger set that runs after committing the mutation transaction. If the call to the mutation is wrapped in a transaction, these
* will be run after the wrapping transaction is completed.
*/
afterCommit?: EntityNonTransactionalMutationTrigger<
TFields,
Expand All @@ -65,9 +64,8 @@ export default interface EntityMutationTriggerConfiguration<
}

/**
* A trigger is a way to specify entity mutation operation side-effects that run within the
* same transaction as the mutation itself. The one exception is afterCommit, which will run within
* the transaction if a transaction is supplied.
* A transactional trigger is a way to specify entity mutation operation side-effects that run within the
* same transaction as the mutation itself.
*/
export abstract class EntityMutationTrigger<
TFields extends object,
Expand All @@ -86,7 +84,7 @@ export abstract class EntityMutationTrigger<

/**
* A non-transactional trigger is like a EntityMutationTrigger but used for afterCommit triggers
* since they explicitly occur outside of the transaction.
* since they run after the transaction is committed.
*/
export abstract class EntityNonTransactionalMutationTrigger<
TFields extends object,
Expand Down
Loading