Skip to content

coletiv/phoenix_absinthe_authenticated_subscriptions

Repository files navigation

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 and import this workspace.

  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

About

Phoenix absinthe authenticated subscriptions article

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published