hubertlepicki
I am trying to set up Absinthe following the documentation here: Plug and Phoenix Setup — absinthe v1.11.0
on a brand new Phoenix 1.7 project.
I have generated the project with:
mix phx.new api --no-assets --no-ecto --no-dashboard --no-mailer --no-html --no-live --no-gettext --module=API
and now I try to add Absinthe. I installed dependencies:
defp deps do
[
{:phoenix, "~> 1.7.20"},
{:telemetry_metrics, "~> 1.0"},
{:telemetry_poller, "~> 1.0"},
{:jason, "~> 1.2"},
{:dns_cluster, "~> 0.1.1"},
{:bandit, "~> 1.5"},
{:absinthe_plug, "~> 1.5"}
]
end
And I configured my router:
defmodule APIWeb.Router do
use APIWeb, :router
forward "/api/graphql", Absinthe.Plug,
schema: API.Schema
forward "/api/graphiql",
Absinthe.Plug.GraphiQL,
schema: API.Schema,
interface: :simple
end
The app compiles but when I make requests to either /api/graphq or /api/graphiql I am getting:
[info] GET /api/graphiql
[error] ** (Plug.Conn.NotSentError) a response was neither set nor sent from the connection
(bandit 1.6.7) lib/bandit/pipeline.ex:172: Bandit.Pipeline.commit_response!/1
(bandit 1.6.7) lib/bandit/pipeline.ex:44: Bandit.Pipeline.run/4
(bandit 1.6.7) lib/bandit/http1/handler.ex:12: Bandit.HTTP1.Handler.handle_data/3
(bandit 1.6.7) lib/bandit/delegating_handler.ex:18: Bandit.DelegatingHandler.handle_data/3
(bandit 1.6.7) lib/bandit/delegating_handler.ex:8: Bandit.DelegatingHandler.handle_continue/2
(stdlib 6.0.1) gen_server.erl:2163: :gen_server.try_handle_continue/3
(stdlib 6.0.1) gen_server.erl:2072: :gen_server.loop/7
(stdlib 6.0.1) proc_lib.erl:329: :proc_lib.init_p_do_apply/3
My schema so far is also generated from documentation:
defmodule API.Schema do
use Absinthe.Schema
@desc "An item"
object :item do
field(:id, :id)
field(:name, :string)
end
# Example data
@items %{
"foo" => %{id: "foo", name: "Foo"},
"bar" => %{id: "bar", name: "Bar"}
}
query do
field :item, :item do
arg(:id, non_null(:id))
resolve(fn %{id: item_id}, _ ->
{:ok, @items[item_id]}
end)
end
end
end
Anyone knows what I’m doing wrong?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex










Showing Posts 1 to 7- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
hubertlepicki
OK I generated the app again and did the set up steps and everything is working. I think I may have either generated app that’s too bare bones to work with Absinthe or made some other error along the way. It works now.
dimitarvp
It would still be interesting to make a recursive diff and check. Assuming you have the time, of course, which we all know is not a given.
hubertlepicki
I deleted the previous app and it was never in the repo. I’m sorry
dimitarvp
It’s okay man, I know you’re busy and have stuff to do.
I’m simply always interested in boiling down the exact causes of such seemingly random problems. It’s an endless fascination for me.
hubertlepicki
I have not used
mix phx.new.webto generate the app, and then had to manually rename api_web to api etc.If I was to bet on where I messed up, it’s somewhere there.
dimitarvp
Next time.
stevensonmt
How did you make the requests?
I’ve noticed sometimes that recompiling in an iex session (started with
iex -S mix) is not effective. Have to end that session and start a new one for changes to be applied.