api-platform / api-platform/core
Mercure normalization context per topic
- Dominant language
- PHP
- Stars
- 2.6k
- Forks
- 980
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 49
Description
**Description**
I think it could be useful support to provide normalization context (or also other options) for mercure per topic. For example if the resource has an additional serialization groups for admin user but the resource update should still be dispatched to admin and simple user currently the hidden information would be dispatched to the simple user or otherwise admin would not receive private information.
**Example**
Maybe something like:
```
#[ApiResource(
mercure: [
'topics' => [
['topic' => '/book/1', 'private' => true, 'normalization_context' => ['read', 'read_admin']],
['topic' => '/book/1', 'private' => false, 'normalization_context' => ['read']],
]
]
)]
```
Contributor guide
Assessment
This issue has not been assessed yet.