Proof of concept to get subscription working with https://github.com/rebing/graphql-laravel
To use graphql-playground (not possible to set the subscription url) rewriting url to port 6001 is needed, This is how i done with Apache
<VirtualHost *:80>
...
RewriteEngine On
RewriteCond %{HTTP:Upgrade} =websocket [NC]
RewriteRule /(.*) ws://127.0.0.1:6001/$1 [P,L]
</VirtualHost>
Todo: add docker or nginx example
-
Start a web server ...
-
Start the websocket server
artisan websockets:serve
-
Test in playground
-
Input the the newUser subscription
-
Click run
-
Fire an broadcast call with https://localhost/broadcast
-
See new data showing up in the interface
-
Or with Angular: https://github.com/crissi/angular-subscriptions
Add docker or nginx example