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

[Mercure][Feature] Configure automatic mercure updates #3785

Open
stephanvierkant opened this issue Oct 24, 2020 · 1 comment
Open

[Mercure][Feature] Configure automatic mercure updates #3785

stephanvierkant opened this issue Oct 24, 2020 · 1 comment

Comments

@stephanvierkant
Copy link
Contributor

As far as I can see, API Platform sends updates on insert/update/delete (\ApiPlatform\Core\Bridge\Doctrine\EventListener\PublishMercureUpdatesListener::onFlush) automatically. This causes performance problems if many entities are updated/inserted/deleted at once. In my case, I'm not listening to inserts and deletions, so it doesn't make sense to send the updates in the first place.

It would be great if some kind of configuration would be possible.

@soyuka
Copy link
Member

soyuka commented Feb 23, 2021

This is true only with mercure=true on an entity right? I'd say that you should definitely override our PublishMercureUpdatesListener to have all the control you need. I've done so on few projects already. I'm having a hard time seeing how we could "configure" these updates unless coding the listener.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants