dwyl / learn-api-design

🏙️ Essential learning for people building APIs
802 stars 116 forks source link

Should we investigate Apollo (GraphQL) ? #24

Open nelsonic opened 8 years ago

nelsonic commented 8 years ago

relates to #18

Jbarget commented 7 years ago

this would be great for someones 20% time ;)

On the surface of things, it could cut the number of api requests we need to make.

From reading the blog post it sounds like Github feel a shift from REST to GraphQL.

Has anyone used it?

I know its made by faceybook but could improve our apps in the future

Resources:

http://graphql-elixir.org/ https://hexdocs.pm/plug_graphql/readme.html https://www.infoq.com/news/2016/10/graphQL-GitHub

pankajpatel commented 7 years ago

I had spent little time on a PoC for HapiJS+GraphQL(Apollo)+REST API and React+Redux(with Apollo Tools) at Front End. https://github.com/pankajpatel/hapi-redux-graphql-rest

It turned out to be a successful experiment and can accommodate the (legacy) REST APIs as well (to support legacy or recently developed systems).

Now I have moved my app's REST API development with HapiJS+Mongoose to HapiJS+GraphQL+Mongoose.

markhu commented 7 years ago

IMHO, the HTTP2 standard might be a game-changer as an alternate way to reduce REST latency.

nelsonic commented 7 years ago

Found https://github.com/absinthe-graphql/absinthe + http://absinthe-graphql.org/ via https://elixirforum.com/t/graphql-absinthe-vs-graphql-elixir/1589 considering trying it out ...

Jbarget commented 7 years ago

@des-des havent you used it recently?

nelsonic commented 7 years ago

Briefly experimented with Absinthe (GraphQL) and Phoenix: https://github.com/nelsonic/phoenix-absinthe-graphql-api but did not see the benefit as Channels (RealTime/PubSub) is not yet available. Created follow up issue: https://github.com/dwyl/api/issues/19

@Jbarget we used GraphQL quite a bit at TC: https://github.com/dwyl/learn-graphQL Again, I was put off by the lack of subscriptions. While they are in the spec: https://facebook.github.io/graphql/#sec-Subscription-Operation-Definitions Most implementations do not have the feature yet. ⌛️