Skip to content

Commit

Permalink
feat: use better QueryContext types for transactional triggers and va…
Browse files Browse the repository at this point in the history
…lidators (#136)
  • Loading branch information
wschurman authored Sep 18, 2021
1 parent 4263cb9 commit 5c7efe1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions packages/entity/src/EntityMutationTriggerConfiguration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EntityMutationInfo } from './EntityMutator';
import { EntityQueryContext } from './EntityQueryContext';
import { EntityTransactionalQueryContext } from './EntityQueryContext';
import ReadonlyEntity from './ReadonlyEntity';
import ViewerContext from './ViewerContext';

Expand Down Expand Up @@ -78,7 +78,7 @@ export abstract class EntityMutationTrigger<
> {
abstract executeAsync(
viewerContext: TViewerContext,
queryContext: EntityQueryContext,
queryContext: EntityTransactionalQueryContext,
entity: TEntity,
mutationInfo: EntityMutationInfo<TFields, TID, TViewerContext, TEntity, TSelectedFields>
): Promise<void>;
Expand Down
4 changes: 2 additions & 2 deletions packages/entity/src/EntityMutationValidator.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { EntityMutationInfo } from './EntityMutator';
import { EntityQueryContext } from './EntityQueryContext';
import { EntityTransactionalQueryContext } from './EntityQueryContext';
import ReadonlyEntity from './ReadonlyEntity';
import ViewerContext from './ViewerContext';

Expand All @@ -16,7 +16,7 @@ export default abstract class EntityMutationValidator<
> {
abstract executeAsync(
viewerContext: TViewerContext,
queryContext: EntityQueryContext,
queryContext: EntityTransactionalQueryContext,
entity: TEntity,
mutationInfo: EntityMutationInfo<TFields, TID, TViewerContext, TEntity, TSelectedFields>
): Promise<void>;
Expand Down
2 changes: 1 addition & 1 deletion packages/entity/src/EntityMutator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ abstract class BaseMutator<
| EntityMutationTrigger<TFields, TID, TViewerContext, TEntity, TSelectedFields>[]
| EntityMutationValidator<TFields, TID, TViewerContext, TEntity, TSelectedFields>[]
| undefined,
queryContext: EntityQueryContext,
queryContext: EntityTransactionalQueryContext,
entity: TEntity,
mutationInfo: EntityMutationInfo<TFields, TID, TViewerContext, TEntity, TSelectedFields>
): Promise<void> {
Expand Down

0 comments on commit 5c7efe1

Please sign in to comment.