Open vcuculo opened 3 years ago
This was also useful for the bridge with the ODD as far as I remember, so in case this issue could serve two "clients".
This is very generic to assess. Can you be a little more specific as to what you had in mind to be very useful to subscribe to?
It would be very useful to have the Subscriptions operation type of GraphQL in order to implement a notification system.
(related to dyne/zenpub#57)
Thank you @adam-burns , and forgive my vagueness. The question was to ask if this GraphQL functionality was already supported or if it was planned to support it in ReflowOs. I guess it would require additional server functionalities and configuration, such as a WebSocket server, so I was first asking if it would be feasible to support it.
Considering that it is possible to do so and speaking for our specific use-case, it would be very useful to subscribe to the creation of a new Offer
and Commitment
.
Hi @vcuculo, it is indeed feasible though requires some implementation on the server, and the addition of subscriptions to the GraphQL schema, so we indeed need to clarify which data types (eg. Intent, Proposal or Commitment) and operations should be exposed via subscriptions.
In Bonfire we have a notifications feed which contains Activities such as when you are mentioned or someone replies to something of yours (eg. an offer), so that would definitely benefit from subscriptions, as well as any other Feed or Thread. Those do not yet have any GraphQL API though.
requires some implementation on the server
I have gone ahead and implemented subscriptions in the API.
So now remains to define what subscriptions are needed.
Thank you @mayel , this is very cool! For our specific use case, it would be useful to have subscriptions related to newly created Intents and Commitments, filtered by a provider and/or a receiver.
It would be very useful to have the Subscriptions operation type of GraphQL in order to implement a notification system.
(related to https://github.com/dyne/zenpub/issues/57)