Does strapi support graphql subscriptions? - graphql

I'm using a headless CMS (strapi) for my backend. My requirement is to send a notification to fe client once a comment is created in the backend.
I need to know whether strapi supports graphql subscriptions (if so can you please share sample code)or is their a better approach to solve this?

Strapi does not support this now, but graphql subscriptions are under consideration on the strapi roadmap.
Feel free to vote for it to push this topic.

Related

Can we use Statamic CMS ( as a backend) and Vue with GraphQL on the frontend for the website?

I want to build a portal in which I want to have below stacks:
Statamic CMS (As the backend)
GraphQL for the API's
Vue js as the frontend
Can anyone help me with the above tech stack, and it will be helpful if there will be any documentation available to develop a website with these stacks.
Thanks!!
I have gone through the documentation of Statamic in which I am confused that I can have all in statamic or not?
Yes, Statamic has built-in support for GraphQL. There's documentation on how the GraphQL API works here.
Statamic doesn't care what you're using to consume the GraphQL API (you could use Vue/React/Vanilla/whatever you want).

api-platform: automatic mercure subscriptions for GraphQL queries

api-platform automatically issues events to a mercure hub when updating resources marked with mercure=true and publishes the topics to listen on in the according GET endpoints. Nice. Is there already an option that I can use in the generated GraphQL endpoints?
The mercure docs say: https://github.com/dunglas/mercure#how-to-use-mercure-with-graphql that mercure should integrate "very well" with any GraphQL API as long as it "returns a corresponding topic URL". But afaik the GraphQL API generated by api-platform doesn't (https://api-platform.com/docs/core/mercure/). Do I miss anything or is this upcoming? Using apollo-vue on the frontend.
To work around I could listen to changes on all entity ids using dedicated EventSource topics on the frontend. I would use an URI template like http://localhost:8080/product_streams/{id} there. But I can't manage to write an uri template that matches only certain ids like: http://localhost:8080/product_streams/{id:123,456,789} to get only updates for streams no 123 456 789 (tried https://uri-template-tester.mercure.rocks/ && https://www.rfc-editor.org/rfc/rfc6570#page-18) with no success :(
Edit: GraphQL subscriptions are now supported by API Platform. Checkout the documentation: https://api-platform.com/docs/master/core/graphql/#subscriptions
API Platform doesn't support GraphQL subscriptions yet.
Adding support for subscriptions using Mercure (that is designed among other things for this use case) is planned, but the work hasn't started yet. Any help is welcome!

Sending web push notifications from Laravel

I have a website running Laravel in the back-end, where users can create reports for other users.
When the report is created I would like to send a push notification to recipient user's desktop.
Do I need to use services like Pusher, OneSignal?
Any useful site with examples would be appreciated.
Your question
You could use Pusher, Redis/Socket.io, Pubnub, etc. Which one to use? well, this is more an opinion-based question.
These services broadcast events, then in your client apps (like your web front-end) you configure the client-side libraries of the service you choose to subscribe (to channels) and listen to those events. The documentation explains it better.
Examples/tutorials
Pusher
This is a tutorial published by the Pusher team.
Redis/Socket.io
This one
is a Laracasts series about this.
Just google.
Update
There is a Laravel-specific alternative, a package created exclusively for Laravel:
Laravel WebSockets
This is the post talking about the package and its inner working.
This is the repo.
Here you have the documentation.
If you like to show Native Desktop notification then i would suggest Web Push notification. In this way once user subscribed to push notification ,they will get real time notification and does not need to be on your website.
https://github.com/laravel-notification-channels/webpush

Microsoft Botframework and Data Protection

I'm using MS Bot Framework with Directline for webchat and our client has raised an issue about Data Protection i.e. the user is sending personal data via a Microsoft api.
I don't really know how to reply to this since (a) Pretty much every bot uses a cloud service if you want any sort of assistance and (b) I assume that Directline does nothing with the data and it is purely a conduit, but I don't know that for a fact.
Was going to post on bot builder github issues, but they say it's just for bugs and suggested that I come here. I am looking for some clarification (or a contact at MS) about the privacy and data protection of the conversations if you are using Microsoft's bot framework with any one of their connection services - particularly Directline.
Thanks,
Jarrod
Our official handling terms are listed under the Bot Framework Terms of Service and Privacy statement found on the Bot Framework portal. Are there specific questions your customer has?
-jim

Mail API - MailChimp VS Amazon SES VS mailgun

We are looking at integrating with some kind of mail service API but the key thing is we need extensive reporting. I cant get much details on this from the different providers short of contact them so I thought id just ask and find out if anyone knows which service has detailed reporting?
I assume Amazon SES would be the best choice (+ price is good) but confirmation that their service offers really good API reporting would help finalise my decision.
We will be hooking into their API for reporting and displaying the reports on our clients CMS. No, we dont want to redirect the client to any of the provider's login as we want all the clients website data centralised.
With Amazon SES you have all the reporting that you want, but you will have to generate it yourself. Clicks/Bounces/Opens - Amazon SES does not provide you with any of these out of the box, not by an API and not by their console.
Mandrill (which is mailchimp's api service) does provide much more extensive repoting built in, but last I checked, you can't access it by API, only in their dashboard.
I have no idea about mailgun
Well since asking this question I have landed up using MailChimp's API. At the time of asking I couldnt find info on a MailChimp API with reporting.
Great API and features but quite complex replicating their back-end within your own CMS (especially campaigns).

Resources