Skip to content

Commit

Permalink
Add part
Browse files Browse the repository at this point in the history
  • Loading branch information
fraxachun committed Oct 18, 2024
1 parent 07cbbe9 commit 12ee25e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/docs/content-scope/evaluate-content-scopes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ async products(@Args("dealerId", { type: () => ID }) dealerId: string): Promise<
}
```

It's possible to add multiple `@AffectedEntity` decorators to one operation if multiple entities are affected:

```ts
@Query(Product)
@AffectedEntity(Product)
@AffectedEntity(Dealer, { idArg: "dealerId" })
async product(@Args("id", { type: () => ID }) id: string, @Args("dealerId", { type: () => ID }) dealerId: string): Promise<Product> {
//...
}
```

**@ScopedEntity**

Retrieving the affected entity alone is not sufficient, COMET DXP also needs to know the scope of the entity. The simplest case is when the entity has a field named `scope`. If this is true, this decorator is not necessary.
Expand Down

0 comments on commit 12ee25e

Please sign in to comment.