I’ve made a PR #87 to add custom serializers for absinthe_plug
, and I’ve also set up a repo idi-ot/absinthe_test to try it out with msgpax
, but the query
curl -XPOST \
-H "Content-Type:application/graphql" \
-d "{posts {id}}" http://localhost:4000/api
fails with
[info] POST /api
[debug] ABSINTHE schema=nil variables=%{}
---
{posts {id}}
---
[info] Sent 200 in 1ms
[info] Sent 500 in 48ms
[error] #PID<0.432.0> running AbsintheTest.Web.Endpoint terminated
Server: localhost:4000 (http)
Request: POST /api
** (exit) an exception was raised:
** (UnicodeConversionError) invalid encoding starting at <<220, 0, 100>>
(elixir) lib/list.ex:727: List.to_string/1
(phoenix_live_reload) lib/phoenix_live_reload/live_reloader.ex:94: anonymous fn/2 in Phoenix.LiveReloader.before_send_inject_reloader/2
(elixir) lib/enum.ex:1755: Enum."-reduce/3-lists^foldl/2-0-"/3
(plug) lib/plug/conn.ex:971: Plug.Conn.run_before_send/2
(plug) lib/plug/conn.ex:392: Plug.Conn.send_resp/1
(phoenix) lib/phoenix/router/route.ex:161: Phoenix.Router.Route.forward/4
(phoenix) lib/phoenix/router.ex:278: Phoenix.Router.__call__/1
(absinthe_test) lib/absinthe_test/web/endpoint.ex:1: AbsintheTest.Web.Endpoint.plug_builder_call/2
(absinthe_test) lib/plug/debugger.ex:123: AbsintheTest.Web.Endpoint."call (overridable 3)"/2
(absinthe_test) lib/absinthe_test/web/endpoint.ex:1: AbsintheTest.Web.Endpoint.call/2
(plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
(cowboy) /Users/asd/Developer/elixir/absinthe_test/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4
on the phoenix’s side.
Seems like phoenix tries to do something with the response (encoded by msgpax
) and fails.
If I disable code_reloader
, it works fine.