Building an SPA in Phoenix: static HTML with an API

Look at the differences, you are using Absinthe.Plug.GraphiQL instead of Absinthe.Plug

scope "/api" do
  pipe_through :api

  forward "/", Absinthe.Plug,
    schema: AppWeb.Schema
end

scope "/graphiql" do
  pipe_through :api

  forward "/", Absinthe.Plug.GraphiQL,
    schema: AppWeb.Schema
end