Failed to compile Apollo and Absinthe with the Phoenix socket

I’m trying to connect the Absinth socket link with the api of the Phoenix Socket.


import * as AbsintheSocket from "@absinthe/socket";
import { createAbsintheSocketLink } from "@absinthe/socket-apollo-link";
import { Socket as PhoenixSocket } from "phoenix";

export default createAbsintheSocketLink(AbsintheSocket.create(
  new PhoenixSocket("ws://localhost:4000/socket")
));

And I’m getting an error:

Failed to compile.

./node_modules/@absinthe/socket/dist/index.js
Module not found: Can't resolve 'phoenix' in '/Users/romenigld/workspace/app-apollo-ui/node_modules/@absinthe/socket/dist'

and in my endpoint I have:

use Phoenix.Endpoint, otp_app: :plate_slate
use Absinthe.Phoenix.Endpoint

  socket "/socket", PlateSlateWeb.UserSocket

hey @romenigld have you ever solved it? I am having suddenly the same error.

I am not solved. I stopped to try.

Such a sad and depressing thought! I hope you’re otherwise doing excellent!