5 ms·
I think graphql with a single db is an odd thing to gain popularity - as the raison d'être for graphql was to federate and proxy different, heterogeneous data s
by e12e 4y ago
I think graphql with a single db is an odd thing to gain popularity - as the raison d'être for graphql was to federate and proxy different, heterogeneous data sources (databases, json/rest services, soap, other graphql services...).
Speaking of Netflix - I think they had an alternative Api federation service that used some clever tricks with json string vs number keys to allow for alternating http put/get - and through that leverage http level caching. But I can't find the the link...
- IanCal 4y agoThe main thing I see it being used for is field selection and model nesting. From an end user perspective, it's pretty nice for this I think. Certainly nice that if I know it's a graphql endpoint I've already got a fairly solid idea about how to query it.
- ngrilly 4y agoGraphQL raison d’être was not to federate and proxy different, heterogeneous data sources. It has initially been developed as a better API for the Facebook monolith. I asked one of GraphQL’s coauthors directly: https://twitter.com/ngrilly/status/1317415232717860866?s=46&t=gYGscP7V495SUtGS61l83g https://twitter.com/ngrilly/status/1317415232717860866?s=46&....
- e12e 4y agoInteresting - I didn't even know that there was a monolith at Facebook [ed: beyond there being reports that they use a large monorepo for code]. I stand corrected, thank you. This doesn't directly address if graphql at Facebook federated different data sources (eg graph and sql databases) - but I suppose not?
- ngrilly 4y agoI don't have any "insider" information regarding the data sources used by the Facebook monolith, written in PHP, when GraphQL has been developed, but I would expect it to talk to multiple/different datastores, and not just MySQL. Then yes, it could be argued that it has been used to federate multiple data stores, even though it was already the case before using GraphQL :)
- myvoiceismypass 4y agoAre you talking about Falcor? https://github.com/Netflix/falcor https://github.com/Netflix/falcor
- e12e 4y agoI believe so; I think there was a blog post that went into the details - but I can't find it - but I did fint this comment: https://news.ycombinator.com/item?id=10076235 https://news.ycombinator.com/item?id=10076235