Create api by GraphQL, Absinthe and elixir for chat app

hi again, I am learning GraphQL with Elixir this days, it is looking so funny. I have a question about chat app with this api. For chat app we will need rest api for instance ? :slight_smile:

If you’re using GraphQL, then you should probably look for Absinthe and read how to implement real-time using subscriptions.

In my opinion, I prefer to use REST api for a chat app since its easier to build and get started.

yes definitely I am use absinthe :slight_smile: , but I have qurious about how u implement the api with chat api . If you have server , why you will need api?

You could use websocket instead…

It is very powerful :slight_smile:

1 Like

I misunderstood, if you’re gonna build a chat app and you’re using phoenix, then you can leverage phoenix channels.

1 Like

no I mean for example if you want to use develop mobile chat app like viber or telegram, u will need chat server like ejabberd, mongooseIM …etc, but I have curious about why you will use Rest Api? those companies use api for communication between mobile client and chat server? :slight_smile:

:slight_smile: I love elixir and erlang with xmpp and ejabberd :slight_smile: , why u recommend websocket?

Because it is more reactive than REST, or GraphQL api.

Phoenix channels are something You should try, if You don’t know what it is…

1 Like

tnx for ur recommendation, appreciated :slight_smile: