I did a huge heads down on GraphQL vs AppSync vs Firebase for an app I'm building around document collaboration, annotation and sync for people working with PDFs and web content ( https://getpolarized.io/ ) - it's kind of like an offline web browser.... anyway. GraphQL is super awesome at what it does but it's definitely not designed for rapid prototyping applications. The thing about GraphQL is that it's middleware.…
> tons of problems with data over-fetch What is the GraphGL story on caching and closest point of presence redirection? We build a mobile app that consumes various "enterprisy" HTTP-based APIs. Often, due to how the APIs are designed to support a range of different frontends, we have to either fetch more data than we need, or do a bunch of granular requests where we would prefer to do a single large one. But most of…
Facebook’s GraphQL gets its own open-source foundation
61–70 of 94 posts
Re: Facebook’s GraphQL gets its own open-source foundation
#62Earlier quoted context omitted.
I recommend this talk to see what both technologies can still "learn" from each other - https://youtu.be/LUF7plExdv8 . I don't think SPARQL or GraphQL completely replace one another.
I think GraphQL is just an way to bully the efforts of the W3C to standardize web technologies. It not just is non-standard, also is breaks any advantage of the HATEOAS principle.
Re: Facebook’s GraphQL gets its own open-source foundation
#63I did a huge heads down on GraphQL vs AppSync vs Firebase for an app I'm building around document collaboration, annotation and sync for people working with PDFs and web content ( https://getpolarized.io/ ) - it's kind of like an offline web browser.... anyway. GraphQL is super awesome at what it does but it's definitely not designed for rapid prototyping applications. The thing about GraphQL is that it's middleware.…
Where you start running into issues is the surrounding tooling. Integrating a typical REST API into an APM monitoring solution is a cinch, because all of these tools know how to read the incoming requests, HTTP methods, paths, bodies, etc. With GraphQL, you might be left building glue for your APM tool of choice, or just using the highly limited, but at least specialized, Apollo Engine. Enforcing strict rate limiting is easy with REST; very difficult with GraphQL due to how complex and free-form queries are.
Optimizing your backend to support those free-form queries is also (I dare say intractably) difficult; I haven't seen a single backend framework which doesn't actively encourage an N+1 problem on any query which returns multiple objects of data. AppSync as well, my god is that an evil play from AWS; if you've got separate lambda functions serving all the different nodes in your graph, a single query could trigger dozens, or even hundreds, of invocations. Combine that with their guidance to use Aurora Serverless and any casual observer might say that they're actively exploiting the unfortunate ignorance of an engineer trying to jump on the latest trends.
I don't believe any of these things are problems with GraphQL. I think they're issues with ecosystem immaturity, and I hope they get better over time. Frankly, every single backend library I've used sucks; its designed to be awesome on the frontend, and it is.
I think you're right that, right now, its best suited to large organizations. Large organizations can engineer around all of its issues and extract a LOT of value from it. Medium organizations are almost immediately going to run into ecosystem immaturity and scaling issues. Small organizations are going to get the most value from an "all in one" solution, whether that's Firebase, or a simple REST API on App Engine, or something like that.
But I could be wrong in my analysis that its not a core issue with GraphQL, and there are subtle complexities with the API definition language which make scaling it for anyone who isn't Facebook intractable. Time will tell.
Re: Facebook’s GraphQL gets its own open-source foundation
#64I did a huge heads down on GraphQL vs AppSync vs Firebase for an app I'm building around document collaboration, annotation and sync for people working with PDFs and web content ( https://getpolarized.io/ ) - it's kind of like an offline web browser.... anyway. GraphQL is super awesome at what it does but it's definitely not designed for rapid prototyping applications. The thing about GraphQL is that it's middleware.…
Re: Facebook’s GraphQL gets its own open-source foundation
#65Earlier quoted context omitted.
Can you elaborate why SPARQL is the wrong tech?
As someone who used to write SPARQL queries for a living with some of the most established players in the Semantic Web game, the idea of SPARQL and GraphQL serving the same purpose is pure misconception (usually by folks who haven't yet taken the dive into GraphQL). GraphQL allows the backend to say "here's the data I offer and how it's structured, pick which fields you want from that" and the frontend query just spe…
Re: Facebook’s GraphQL gets its own open-source foundation
#66Re: Facebook’s GraphQL gets its own open-source foundation
#67I did a huge heads down on GraphQL vs AppSync vs Firebase for an app I'm building around document collaboration, annotation and sync for people working with PDFs and web content ( https://getpolarized.io/ ) - it's kind of like an offline web browser.... anyway. GraphQL is super awesome at what it does but it's definitely not designed for rapid prototyping applications. The thing about GraphQL is that it's middleware.…
GraphQL to REST is a more typical comparison. In this case: designing a GraphQL API is substantially easier to both make and consume; while REST just tells you "here's some guidelines, now go do it however you want", GraphQL enforces a much more consistent view of how an API should look, while allowing clients much more freedom in how they get the data they need. Where you start running into issues is the surrounding…
Well then you haven't really looked :)
https://join-monster.readthedocs.io/en/latest/
https://github.com/graphile/postgraphile
These are all examples of tools/libs that implement a graphql api without a N+1 issue
Re: Facebook’s GraphQL gets its own open-source foundation
#68I did a huge heads down on GraphQL vs AppSync vs Firebase for an app I'm building around document collaboration, annotation and sync for people working with PDFs and web content ( https://getpolarized.io/ ) - it's kind of like an offline web browser.... anyway. GraphQL is super awesome at what it does but it's definitely not designed for rapid prototyping applications. The thing about GraphQL is that it's middleware.…
When comparing apples to apples, GraphQL is amazing for rapidly iterating.
I think the biggest risk with GraphQL is it’s too easy to just mirror your data structures as an API.
Also, unrelated to the above, but we use Firebase for a few auxiliary real-time needs at work and it goes down constantly.
Re: Facebook’s GraphQL gets its own open-source foundation
#69Re: Facebook’s GraphQL gets its own open-source foundation
#70I did a huge heads down on GraphQL vs AppSync vs Firebase for an app I'm building around document collaboration, annotation and sync for people working with PDFs and web content ( https://getpolarized.io/ ) - it's kind of like an offline web browser.... anyway. GraphQL is super awesome at what it does but it's definitely not designed for rapid prototyping applications. The thing about GraphQL is that it's middleware.…
GraphQL is not comparable to Firebase, it is comparable to implementing your own REST/gRPC/Thrift API. When comparing apples to apples, GraphQL is amazing for rapidly iterating. I think the biggest risk with GraphQL is it’s too easy to just mirror your data structures as an API. Also, unrelated to the above, but we use Firebase for a few auxiliary real-time needs at work and it goes down constantly.
Rapidly iterating what?