React, etc. Tech Stack

React, Flux, GraphQL, Hack, HHVM...? All of this and more!

Tom Dale on GraphQL, Relay and REST

Tom Dale is a known professional in the JavaScript community. Working on Ember.js, a JavaScript framework that is geared towards ambitious web applications, his opinions and thought have a lot of experience behind them. Lately discussed GraphQL on Twitter.

In a series of tweets Tom discusses GraphQL, Relay and REST. With regards to caching, performance and ease of use. There will be a complete article later on, but with the series of tweets are already packed with useful insight.

For now in a transient media like Twitter these thoughts are easily lost and is now here:

The ideas in Relay are fantastic. Kind of like Ember Data but with property-level fidelity and knowledge of components. Very nice.

GraphQL by itself is too flexible. Note that Relay does not work with GraphQL—it works with GraphQL + several important constraints.

Namely, those constraints are that all entities must be addressable top level by type and ID. (Very similar to JSON:API in this respect.)

People conflate Relay-flavored GraphQL and vanilla all the time. Without these constraints is not a good fit for client-side apps IMO.

There are other downsides to GraphQL. It pushes a ton of complexity to your backend, particularly if you're not talking to a graph database.

I see the hype train conductors saying stupid shit like "Why GraphQL will replace REST" and I just start sobbing.