Next.js + Apollo + Server Side Rendering (SSR)

Interesting video from the CodePen podcast in which Shaw goes over this approach to SSR with Next and Apollo: A probably-better approach is to use the getDataFromTree method, which walks down the tree and executes the queries to fill up the ApolloClient cache. Create a shared ApolloClient instance Render the page using getDataFromTree() to fill …

Querying your Redux store with GraphQL

Using Apollo Client’s InMemoryCache and Local Resolvers, it’s possible to have it query your Redux store: import store from "./Store"; const typeDefs = gql` type Query { users: [User] } type User { groups: [Group] } type Group {} `; const client = new ApolloClient({ cache: new InMemoryCache(), typeDefs, resolvers: { Query: { users: () …

A Peek at the Future of GraphQL

Talk by Robert Zhu, member of the GraphQL Working Group (amongst other things). Since the formation of the GraphQL Foundation last year in March, we have been working on creating a resilient process to govern the GraphQL ecosystem and language evolution. In this talk, I will discuss the roles and responsibilities of the GraphQL Foundation, …

Building The New Facebook With React and Relay

With the new Facebook design that got anounced just a few days ago, this video by Ashley Watkins is worth a look: Ashley discusses some of the technologies and strategies powering FB5, the new facebook.com. Topics covered include Facebook’s approach to CSS-in-JS, data-driven dependencies, phased code downloading, and more.

gqless – A GraphQL client without queries

Now this is a step forward: gqless is a fundamentally new approach to a GraphQL client. It makes using your API enjoyable, by generating queries at runtime based upon the data your app consumes. Here’s an example app of it in action. Notice how the data it fetched automagically, depending on what is to be …

RedwoodJS – Bringing full-stack to the JAMstack

Update 2020.06.09: here’s a full tutorial to get you started with RedwoodJS. Now here’s an interesting project: Redwood is an opinionated, full-stack, serverless web application framework that will allow you to build and deploy JAMstack applications with ease. Imagine a React frontend, statically delivered by CDN, that talks via GraphQL to your backend running on …

Full-stack apps with Apollo, a tutorial

The Apollo docs sports a very complete tutorial, combining TypeScript, GraphQL, and Apollo (of course): In this tutorial, we’ll build an interactive app for reserving a seat on an upcoming SpaceX launch. Think of it as an Airbnb for space travel! All of the data is real, thanks to the SpaceX-API. To populate the views, …

Countries, An example GraphQL API

If you’re looking for an example GraphQL API to play with, check out Countries. A public GraphQL API for information about countries, continents, and languages. curl ‘https://countries.trevorblades.com/’ \ -H ‘Content-Type: application/json’ \ -d ‘{“query”:”{ country(code: \”BE\”) { name, native, emoji, currency, languages { code, name } } }”}’ The schema’s available on the playground. Countries …

Urql – A highly customizable and versatile GraphQL client for React

From the folks at FormidableLabs: urql is a GraphQL client that exposes a set of React components and hooks. It’s built to be highly customisable and versatile so you can take it from getting started with your first GraphQL project all the way to building complex apps and experimenting with GraphQL clients. // App.js import …