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

Subscription implementation #13

Open
vcuculo opened this issue Oct 29, 2021 · 6 comments
Open

Subscription implementation #13

vcuculo opened this issue Oct 29, 2021 · 6 comments
Labels

Comments

@vcuculo
Copy link

vcuculo commented Oct 29, 2021

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)

@sbocconi
Copy link

This was also useful for the bridge with the ODD as far as I remember, so in case this issue could serve two "clients".

@adam-burns
Copy link
Member

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)

@vcuculo
Copy link
Author

vcuculo commented Oct 31, 2021

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.

@mayel
Copy link
Contributor

mayel commented Nov 22, 2021

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.

@mayel
Copy link
Contributor

mayel commented Nov 23, 2021

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.

@vcuculo
Copy link
Author

vcuculo commented Nov 23, 2021

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.

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

No branches or pull requests

4 participants