Phoenix absinthe authenticated subscriptions article
- Elixir (
~> 1.10
) - Erlang (
~> 22.0
) - PostgreSQL (
~> 10.6
)
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.
- Install Mix dependencies with
mix deps.get
- Create and migrate the database with
mix ecto.setup
- Start the Phoenix server with
iex -S mix phx.server
Open the GraphiQL Interface and import this workspace.
- Run the
mutation - accountsLogin
- Run the
query - accountsMe
and copy the token returned - Change the ws url token on
subscription - accountsUserCount
and run the query - Verify
accountsUserCount
value changing every 10 seconds on the result pannel