https://github.com/coletiv/phoenix_absinthe_authenticated_subscriptions
Phoenix absinthe authenticated subscriptions article
https://github.com/coletiv/phoenix_absinthe_authenticated_subscriptions
Last synced: 15 days ago
JSON representation
Phoenix absinthe authenticated subscriptions article
- Host: GitHub
- URL: https://github.com/coletiv/phoenix_absinthe_authenticated_subscriptions
- Owner: coletiv
- Created: 2020-04-27T14:02:20.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2020-04-27T18:13:12.000Z (about 5 years ago)
- Last Synced: 2025-03-31T03:12:13.818Z (about 2 months ago)
- Language: Elixir
- Size: 28.3 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Phoenix Absinthe Authenticated Subscriptions
Phoenix absinthe authenticated subscriptions article
## 🚧 Dependencies
- Elixir (`~> 1.10`)
- Erlang (`~> 22.0`)
- PostgreSQL (`~> 10.6`)## 🏎 Kickstart
### Environment variables
We are not using many environemnt variables for now, meaning you have to manually create the `*.secret.exs` files and add them to the server or injecting variables somehow.
### Initial setup
1. Install Mix dependencies with `mix deps.get`
2. Create and migrate the database with `mix ecto.setup`
3. Start the Phoenix server with `iex -S mix phx.server`### Test the solution
Open the [GraphiQL Interface](http://localhost:4000/v1/graphiq) and import [this workspace](https://gist.github.com/marinho10/cdb0814eea1ad1aba9b8faa2048d67aa).
1. Run the `mutation - accountsLogin`
2. Run the `query - accountsMe` and copy the token returned
3. Change the ws url token on `subscription - accountsUserCount` and run the query
4. Verify `accountsUserCount` value changing every 10 seconds on the result pannel