Live data from Hacker News

Intro to Graph APIs

zapier.com

21–27 of 27 posts

Re: Intro to Graph APIs

#21
post #5

GraphQL is an incremental improvement over REST. The next big thing will be REST over WebSockets with single-field granularity and real-time subscriptions for field value changes.

That might look more like graphQL over websockets with realtimes updates. Somebody told me about an already-existing GraphQL with real-time push updates ready-made for integrating with the front-end framework, wish I knew the name of whatever this was, but maybe somebody will chime in. Not sure how anything is RESTful anymore once it's over websockets. The whole point of REST is it's a perfection of HTTP, and the who…

Here is an example how to do realtime subscriptions with GraphQL

https://www.graph.cool/docs/tutorials/worldchat-subscription...

Re: Intro to Graph APIs

#22

I'm really interested to know how server side API's internally handle overreaching problems and performance. Client side developers in my current workplace always ask for huge nested objects. We're having a tough time regarding performance as responses are sometimes 6-7 levels of nested objects. That means a ton of database queries. How does everybody else manage this?

Why is it more than 7 queries?

Re: Intro to Graph APIs

#23

I'm really interested to know how server side API's internally handle overreaching problems and performance. Client side developers in my current workplace always ask for huge nested objects. We're having a tough time regarding performance as responses are sometimes 6-7 levels of nested objects. That means a ton of database queries. How does everybody else manage this?

Why is it more than 7 queries?

If its a collection of 100 items it would be 700 queries.

Re: Intro to Graph APIs

#24

GraphQL is an incremental improvement over REST. The next big thing will be REST over WebSockets with single-field granularity and real-time subscriptions for field value changes.

Having played around with building exactly that, the conclusion I came to is that REST is nice for not having the additional setup step of establishing a websocket connection as well as having the considerably better support for simultaneous http requests over rebuilding that part of the networking stack once again and layering it on top of everything else. For real-time subscriptions though, websockets (pardon my gr…

Neat! I'd love to see your work, as I'm working on something very similar right now. Maybe we can collaborate?

Re: Intro to Graph APIs

#25

GraphQL is an incremental improvement over REST. The next big thing will be REST over WebSockets with single-field granularity and real-time subscriptions for field value changes.

> GraphQL is an incremental improvement over REST.

No, it's a huge step backwards into RPC.

Re: Intro to Graph APIs

#26

Earlier quoted context omitted.

Why is it more than 7 queries?

If its a collection of 100 items it would be 700 queries.

Wouldn't it only be 7?

First query gets the first 100 items, the second query gets the nested associations for those 100 (assuming you couldn't batch it into the first query), the third gets the nested associations for the second's, and so forth. One query for each entity category?

Post reply on HN