API Platform & Mercure, how to handle POST ? #2121
Unanswered
vince83110
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We use API Platform & Mercure bundle, it works very well when you are updating an entity.
But, we want (for example), to automaticaly add a new entity in our listing when someone has created a new one.
I can't see in documentation how to handle it? Because topic like
/topic/products/{product}/items
will work only for existing products.For now, I use DataPersister on POST event, and I will write manually on the topic I have created (with CQRS way, Message +
MessageHandler, like
ProductHasBeenCreatedMessage
)I have created a topic I call (for example):
/topic/product/append/items
, but I can't do it for all my entities, what is the good way to handle POST of new entities ? Did I miss something in doc ?Beta Was this translation helpful? Give feedback.
All reactions