Custom Subscriptions #21999
emahuni
started this conversation in
Feature Requests
Replies: 1 comment 2 replies
-
As mentioned in the prev issue, that |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Describe the Improvement
Ability to use the subscription system to subscribe to custom events using extensions.
Basic Example
I was trying to subscribe to a custom event that was going to be emitted by an extension eg:
then in a the app, a module would sbuscribe to it as
Then each time the extension emits the event, that works the same way subscriptions work. The syntax maybe different according to how you may want it to work.
I am aware that there is a websocket service that is used to emit events from the core... as discussed briefly in #21998
Motivation
I want to be able to send custom subscription events to clients that require subscription based on custom logic on the API side.
The main reason is that there is no way of preventing certain users from accessing content/collections using the content module when you want them to have access to the same collection elsewhere in the app eg using readByQuery. So I created an endpoint to return the required data and prevent the roles I don't want completely. However, the problem comes now when I want to subscribe to data changes, there is no way of doing that.
Detailed Design
Not sure
Requirements List
Must Have:
Drawbacks
Not sure
Alternatives
Create a custom subscription system though one already exists
Adoption Strategy
Documentation alongside subscriptions documentation.
Unresolved Questions
The api is not yet clear
Beta Was this translation helpful? Give feedback.
All reactions