A weekly newsletter of the best news, articles and projects about GraphQL

Articles

Releasing The GraphQL Guide

John Resig and Loren Sands-Ramshaw have just released <em>The GraphQL Guide</em>, a complete reference text for GraphQL. The guide is 886 pages and covers topics such as HTTP, testing, authentication, the GraphQL spec, client libraries, and much more. The authors have provided a 20% launch discount which is valid until April 25. Check out The GraphQL Guide to level up your GraphQL knowledge today.

HTTP caching in GraphQL

GraphQL doesn't come with any built-in support for server-side caching, an issue which often trips up GraphQL server developers. Although not officially supported, there are ways to accomplish HTTP caching with GraphQL. In this article, Leonardo Losoviz goes into detail about how to achieve server-side caching with GraphQL. He talks about accessing GraphQL via GET requests, using persisted queries, and more. Follow along with Leonardo to learn more about how to make your GraphQL servers more performant through caching.

GraphQL Tutorial for Server-Side Swift with Vapor: Getting Started

In this tutorial, Max Desiatov covers how to get started with GraphQL and Server-Side Swift using a concrete API as an example. Max shows how to build a TV show listing API from top to bottom and covers many details of GraphQL along the way, including how GraphQL differs from REST, how to declare model types, fields, queries, and mutations, and more. Follow along with Max to learn more about how to use GraphQL in a Swift app.

Articles

Databases, graphs, and GraphQL: The past, present, and future

GraphQL was never conceived as a query language for databases. Yet, it's increasingly being used for this purpose. This article by George Anadiotis explores how and where GraphQL fits in as a query language for databases, the projects and companies that are using it for that purpose, and what the tradeoffs are. Follow along with George to learn more about GraphQL as a query language for databases.

An Advanced GraphQL with Spring Boot and Netflix DGS

In this article, Piotr Minkowski demonstrates how to use the Netflix DGS library to simplify GraphQL development with Spring Boot. He shows advanced topics related to GraphQL and databases such as filtering or relationship fetching. Follow along with Piotr to learn more about how Netflix DGS and Spring Boot can be used together.

Weaviate is an open-source search engine powered by ML, vectors, graphs, and GraphQL

Weaviate is an API-based vector search engine with a graph data model that allows users to add data objects as graph nodes and (automatically or manually) add (machine learning) vectors to represent the nodes. Weaviate can be used for use cases ranging from similarity search to filtering out redundant information (i.e., deduplication) and from image search to enterprise NLP-based search.

Articles

How To Condense Your GraphQL Queries With the @materializer Directive

The @materializer directive is a custom directive by StepZen that helps GraphQL API developers reduce the amount of code they need to write. In this article, Lucia Cerchie demonstrates how to use the directive and how developers can benefit from it. Follow along with Lucia to find out more about how you can reduce the amount of code required for your GraphQL servers.

Reducing database queries to a minimum with Data Loaders

A data loader is an abstraction between application code and some backing store, such as a database, allowing batching of requests and caching. In this article by Sixfold, the data loader pattern is explored in more detail in context of Kafka consumers. Read on to learn more about data loaders, Kafka, and how they fit into a GraphQL application.

Forget REST. Here's How to Make a GraphQL API with Laravel

Lighthouse is a GraphQL framework that integrates GraphQL into Laravel applications. In this article, Lloyd Miller demonstrates how to use Lighthouse to expose a GraphQL API from a Laravel app. He covers the installation process, how to create database migrations, how to create a schema, and more. Follow along with Lloyd to learn more about how to use GraphQL in a Laravel app.

Articles

Build a Basic GraphQL Server with ASP.NET Core and Entity Framework in 10 Minutes

In this article, Rahul Rai shows how to build a GraphQL server using GraphQL, Autofac, EFCore and the repository pattern. The extensive tutorial goes through the setup process, how to create API models, how to set up a database, and more. Follow along with Rahul to learn more about how to use GraphQL with ASP.NET.

Top 7 GraphQL IDEs you should know about in 2021

The GraphQL ecosystem has grown dramatically since the technology's inception in 2012. IDEs are an important part of the GraphQL toolchain. In this blog post, Vishwa Mehta from Hasura goes through a list of the top 7 IDEs that you should know about in 2021. The list includes popular IDEs like GraphiQL, Insomnia, and Postman, but also includes lesser-known ones. Check out the list of the top 7 GraphQL IDEs to learn more about them and their benefits.

How I’m Developing My Full Stack Web App “With the Guards Up” By Using Apollo and GraphQL

Those familiar with bowling will no doubt have seen how the gutter can be inverted such that the ball is not able to go off track. In this article, Kieron Mckenna brings the analogy of bowling lane guards to app development as he walks through his approach to building full-stack apps "with the guards up". He talks about the problems that we often face when building out an API and a front end to access data from it and shows how we can benefit from tools like Apollo (Client and Server), GraphQL Code Generator, Prisma, and Typescript to make our lives easier.

Building a Realtime GraphQL Chat Application With SMS Notifications

With the emergence of GraphQL came a new way for developers to develop client/server applications. The benefits of developing GraphQL applications are numerous, from explicitly requesting what you need from the server to real-time event-driven communication through subscriptions. This article highlights code-first GraphQL and its superpowers. The article also outlines how to develop a chat application powered by Next.js and Apollo on the frontend, and Prisma, graphql-yoga and SMS notification using the excellent Vonage SMS API on the backend.

The Data Access Layer in Jmix: JPA on Steroids

JPA is a de-facto standard for creating a data model for Java applications. This API does not provide facilities to implement advanced security features or soft deletes so developers have to implement their own solutions. In this article, Andrey Belyaev discusses the data access layer in Jmix and talks about what can be done with this framework and its tools. He then shows how data access works under the hood.

Articles

Beyond REST - Rapid Development with GraphQL Microservices

Since early 2020, Netflix has been iteratively developing systems to provide internal stakeholders and business leaders with up-to-date tools and dashboards with the latest information on the pandemic. One approach that is gaining mind-share within Netflix Studio Engineering is the concept of GraphQL microservices (GQLMS) as a backend platform facilitating rapid application development. In this post, Dane Avilla goes in-depth about how Netflix implemented GraphQL Microservices, including details on database views as an API, PostgresSQL composite types, and more.

How Square accelerates product development with Apollo GraphQL

Square started their journey in 2009 with a credit card reader that plugged into the iPhone and iPhone app using a single Ruby on on Rails service. Since then, they have grown into an international company providing a suite of products and platforms to help businesses and individuals participate in the economy. In this webinar by Apollo, Tech Lead on the Platform, Infrastructure, and Engineering Team, Lenny Burdette, discusses how Square works with Apollo to build a better experience for their customers. Check out the webinar to learn more about how Apollo GraphQL is used at scale.

Articles

Building REST from GraphQL - a story of engineering in Haskell

Hasura's GraphQL engine is built with Haskell, a language choice some may consider unintuitive. In this article, Lyndon Maydwell recounts how Hasura recently implemented a new feature which maps REST interfaces to GraphQL queries and how Haskell was advantageous in doing so. Read on to find out more about Hasura's new feature and how their engineering team approached it.

Explore GraphQL with Graphman

Graphman is a new macOS and iOS app that allows developers to prototype requests and explore GraphQL APIs. In this post, Tim Roesner illustrates how to use Graphman in both settings. He details how to use GraphQL unions, nested queries, variables and more. Follow along with Tim to find out more about Graphman and how you can use it today.

How we use GraphQL at Europe's largest fashion e-commerce company

Managing consistent and backwards-compatible APIs for web and mobile app frontends is always a complex task in the long-term. Zalando uses GraphQL to solve some of the most common problems of frontend data requirements while gaining speed of delivery in a large and quickly growing organization. In this article, Aditya Pratap Singh talks about GraphQL as Unified-Backend-For-Frontend (UBFF) application. It's the first in a series of posts about problems Zalando solved with GraphQL.

Articles

Building a GraphQL CRUD API for your Database with TypeGraphQL & Prisma

Building CRUD APIs can be a tedious chore. The time spent writing glue code, plumbing layers together and doing repetitive work is often better invested into tasks that actually add value and solve interesting problems. In this article, Alex Ruheni shows how to prototype an e-commerce GraphQL CRUD API using TypeGraphQL, Apollo Server and Prisma for database access. Follow along with Alex to learn more about these great technologies and how they can save you time.

Using Lambda on Slash GraphQL with examples

Slash GraphQL is a fully managed GraphQL backend service that pairs well with AWS Lambda. In this post, Apoorv Vardhan demonstrates how to use the Slash GraphQL service along with Lambda functions for custom logic. The article covers how to create a schema, how to get set up locally, how to create a lambda field resolver, and more. Follow along with Apoorv to find out more about how Slash GraphQL and AWS Lambda work together.

Build an app with GraphQL, Lambda, DynamoDB, Serverless Framework, Vue, React and Tailwind

Fullstack Serverless GraphQL is a guide that walks developers through how to build apps with Lambda, DynamoDB, Serverless Framework, React, Vue and Tailwind. The app allows users to book vacations to the moon. The frontend projects explore some advanced patterns in Vue as well as implementing Apollo Local State in React as a replacement for Redux. Check out the tutorial to learn more about how these technologies can be used together.

GraphQL in Swift

In this article, Majid Jabrayilov demonstrates how to use GraphQL in a Swift app. He begins by introducing GraphQL and the benefits it provides, how the tools provided by Apollo fit in, and how to set everything up in a Swift project. Follow along with Majid to find out how you can use GraphQL in your own Swift projects.

Articles

Doing More With GraphQL: Interfaces and Unions

GraphQL offers two abstract types: interfaces and unions. Abstract types make APIs easier to use and create room for growth. This article by Abu Sakib presents several examples of what you can do with interfaces and unions and shows the capabilities they can provide for your own projects.

How to Build a GraphQL API for Text Analytics with Python, Flask and Fauna

In this article, Adesina Abdrulrahman demonstrates how to build a text analytics API with GraphQL. The article shows how to use Levenshetein distance in a GraphQL API with the well-known NLTK library. Follow along with Adesina to learn more about how you can bring text analysis to GraphQL.

Querying Data With GraphQL & Ballerina

Ballerina is an open source programming language and platform that is geared towards writing software for the cloud. In Ballerina, the GraphQL object structure is modelled using services. In this article, Anjana Fernando demonstrates how to build a GraphQL application with Ballerina and what developers must be aware of while doing so. Follow along with Anjana to learn more about Ballerina and how to use it with GraphQL.

Articles

Open Sourcing the Netflix Domain Graph Service Framework: GraphQL for Spring Boot

Netflix has developed a Domain Graph Service (DGS) framework and has now made it open source. The DGS framework simplifies the implementation of GraphQL, both for standalone and federated GraphQL services. The framework is battle-hardened by Netflix's use at scale. Read on to find out more about DGS and how you can use it in your own projects.

Oh Hello Apollo Client , Goodbye Redux!

Apollo Client is a popular library for using GraphQL in front end applications. Apollo offers its own variety of state management and can be used as a replacement for Redux. In this article, Ankita Kulkarni goes into detail about when one might consider replacing Redux with Apollo Client and what some of the trade offs are. The article goes into detail about local-only fields, reactive variables, and more. Follow along with Ankita to learn more about how you can replace Redux with Apollo Client.

Building A Customer Journey using Domain Driven Design and GraphQL

An important part of building digital experiences is to take special care in designing the user's journey. In this article, Anand Chandrashekar shows how to design and build a customer journey using Domain Driven Design. The demo application is built with GraphQL and uses a Slash GraphQL backend. Follow along with Anand to learn more about Domain Driven Design.

Creating a Twitter Graph Using Slash GraphQL

In this article, John Vester demonstrates how to analyze Twitter search results graphically using GraphQL. As part of the tutorial, he shows how to expose links and nodes that are not apparent through any other data analysis efforts. The demonstration uses Slash GraphQL as a backend and also touches on Angular to visualize the data. Follow along with John to learn more about how to deal with data visualizations using GraphQL.

Articles

Generated GraphQL APIs: Tight Coupling as a Service

Generating APIs is becoming more and more popular, especially in the GraphQL community. One of the challenges that comes with generated GraphQL APIs is that there are tradeoffs one must accept which might not bode well for production. One example is that certain information that should be hidden is actually exposed in the generated API. In this post, Jens Neuse discusses GraphQL API generation, the tradeoffs that exist therein, and how to overcome them. Follow along with Jens to learn more about how to be effective with generated GraphQL APIs.

GraphQL Defer Example - Part 1

In this post, Dilan Srilal discusses the GraphQL @defer directive and how it can be used in a GraphQL API. He provides an example with graphql-helix, nexus, and the experimental stream defer package. Follow along with Dilan to find out more about the defer directive and how it is used.

Implementing a GraphQL Server With Components In PHP

PoP is a library by Leonardo Losoviz that is used for creating GraphQL APIs in PHP. In this article, Leonardo describes the architectural design of a GraphQL server written with PoP. He talks about the impetus for PoP and its design, how components are defined with PoP, and more. Follow along with Leonardo to find out more about working with GraphQL in PHP.

Articles

The Easiest Way to Create a GraphQL API for a TypeScript Module

When building a GraphQL server to allow access to a TypeScript module, one needs to make sure that the types in the GraphQL schema reflect accurately what data is expected. In this article, Marcin Hagmajer goes into detail about how this can be achieved with TypeGraphQL. He gives side-by-side demonstrations of getting to the same outcome with both native TypeScript and TypeGraphQL. Follow along with Marcin to learn more about how you can benefit from type safety in your GraphQL APIs.

Rendering the WordPress Philosophy in GraphQL

WordPress holds the philosophy that user needs should be prioritized over developer convenience. In this guide, Leonardo Losoviz shows how the WordPress philosophy can be realized in a GraphQL setting. He shows how the code-first approach can help and demonstrates it through how his GraphQL API for WordPress plugin works.

Jetpack Compose and GraphQL, a very merry combination!

Jetpack Compose is a toolkit for building native UIs in Android. This toolkit can be paired with other tools, GraphQL being one of them. John O'Reilly demonstrates how Jetpack Compose can be used in conjunction with GraphQL and Apollo. He shows how to run queries, how to implement paging, and more. Follow along with John to find out more about how you can use Jetpack Compose and GraphQL together.

How to stop using your GraphQL API as a REST API

When moving to GraphQL from REST, it's natural to try to bring RESTful patterns and adapt them to GraphQL. However, this creates some issues, especially when it comes to data overfetching. In this article, Amanda Beiner talks about the problems that come from trying to use RESTful patterns in GraphQL, the downstream issues that arise from it, and how you can adapt in a more suitable way.

Articles

Using Apollo React Hooks with Typescript

For React developers moving to TypeScript, it's not always apparent how to apply type safety to an existing code base. This tutorial offers guidance to developers who want to apply type safety to their Apollo Client code in a React application. It gives side-by-side views of Apollo Hooks usage with regular JavaScript and then with TypeScript. Follow along to find out how you can make your React applications more type-safe.

Supporting opt-in nested mutations in GraphQL

In this article, Leonardo Losoviz talks about the issue of nested mutations in GraphQL. He covers what nested mutations are, why it's a challenge to support them in the GraphQL spec, and how developers can implement nested mutations if they are needed. The tutorial is very thorough with plenty of code examples. Follow along with Leonardo to find out more about nested mutations in GraphQL.

Dgraph and Slash GraphQL: Using Insomnia with Examples

Insomnia is one of the most popular API development tools that also supports GraphQL. In this article, Abu Sakib demonstrates how to use Insomnia to interact with a Slash GraphQL instance and perform GraphQL requests such as mutations and queries. Follow along wth Abu to learn more about how to use Insomnia with Slash GraphQL.

How to Make GraphQL and DynamoDB Play Nicely Together

Many developers are running GraphQL in serverless functions. One issue with this is that SQL databases aren't always the best fit for serverless. DynamoDB is designed to work well with serverless but it is often misunderstood. In this tutorial, Ryan Bethel guides developers through setting up a GraphQL API backed by DynamoDB on serverless functions. Follow along to learn more about how you can get all the benefits of GraphQL on serverless with a database that is well-suited to the task.

Writing a To-Do App with GraphQL and Web Components

Apollo Elements is a library for building reusable GraphQL components. It works by offering a variety of underlying web component authoring libraries to construct GraphQL-aware components. This post demonstrates how to write a todo app using Apollo Elements. Follow along to find out more about how you can benefit from using Apollo within web components via Apollo Elements.

Articles

Getting Started with Apollo GraphQL on Android

Apollo provides a library called apollo-android which is designed to work with GraphQL in Android applications. This tutorial by Joe Birch goes into detail about the apollo-android library and how you can use it in an Android project. The tutorial goes into detail about how to set up a project, how to construct a schema, how to perform queries and mutations, and more. Follow along with Joe to find out how you can use GraphQL in your Android apps.

Creating a Data Graph with GraphQL Mesh and Hasura Remote Joins

In this tutorial, Praveen Durairaju covers how to use Hasura remote joins. Remote Joins in Hasura allow developers to join data across tables and remote data sources. Data Federation using Hasura Remote Joins is now available from the v1.3.0 stable release. Follow along with Praveen to learn how to work with data across disparate sources.

Building distributed GraphQL backend using Rust and Apollo Federation

In this article, Roman Kudryashov shows how to build a GraphQL backend using Rust. Roman touches on many core concepts of GraphQL, including the N+1 problem, custom scalars, API security, and more. Follow along with Roman to learn how to build a fully-functional GraphQL API with Rust and Apollo Federation.

Articles

Supercharge Feeds with Algolia and GraphQL

What if we could teach a GraphQL API to understand all of our data, regardless of its origin or implementation, so that we can enrich data seamlessly and bidirectionally between the tools, services, and APIs that comprise our stack?

Tracking the Worst Sci-Fi Movies With Angular and Slash GraphQL

A Slash GraphQL service instance contains everything needed to provide data to an Angular app. Follow along with John Vester as he demonstrates how to make an app to track the worst movies of all time.

GraphQL Data Fetching with SWR React Hooks and Hasura

The name “SWR” is derived from stale-while-revalidate, a cache invalidation strategy popularized by HTTP RFC 5861. SWR first returns the data from cache (stale), then sends the fetch request (revalidate), and finally comes with the up-to-date data again. This article shows how to use SWR in a GraphQL and React context backed by Hasura.

Build Your Own Puppy Playdate Tinder App with Slash GraphQL

In this article, Tyler Hawkins details how to use Slash GraphQL to build a pupply playdate app. The stack for this tutorial includes React, Material-UI, Apollo Client, and Slash GraphQL. The article offers step-by-step guidance on using each technology and is a great starting point for getting familiar with Slash GraphQL.

The new GraphQL API for Vector

Vector is an observability agent written in Rust. The team recently added a new GraphQL API using async-graphql and graphql-client, along with a custom WebSocket subscription client to power their new terminal dashboard tool. This post is the first in a three-part series introducing it.

Announcing Nexus 1.0: A Major Release for Type-Safe, Code-First GraphQL APIs

Nexus is a library for building code-first and type-safe GraphQL APIs. After more than two years of development, the Nexus team recently released version 1.0. There are several breaking changes and also a slew of new features for Nexus at 1.0. In this post, Ryan Chenkie from Prisma goes into detail about what you should expect as you upgrade.

GraphQL Authorization with Graphene, SQLAlchemy and oso

In this post, David Hatch demonstrates how to use oso, an open source library for enforcing authorization rules. It covers how to declaratively specify authorization rules in Polar, oso's policy language and how to integrate oso into a GraphQL application in only a few lines of code.

Articles

Server Driven UI, Part 2: The GraphQL API

Joe Birch has just released the second in his Server Driven UI blog post series, this time focusing on GraphQL APIs. He goes into detail about about how it can be advantageous to construct API responses to also include the UI components for a screen instead of just the data itself. Read on to find out more about the Server Driven UI pattern and how you can benefit from it in your own applications.

5 Reasons to use GraphQL at Your Company

Many developers reach for GraphQL because it provides a great developer experience. However, GraphQL also brings a great deal of value to organizations. In this article, Kentaro Wakayama gives five reasons why organizations might want to adopt GraphQL. He covers some of the best-loved features of GraphQL and goes into detail about how they benefit companies.

GraphQL — Diving Deep

In this article, T.V. Vignesh kicks off a tutorial series where he teaches GraphQL and its ecosystem in-depth. He covers some of the history of GraphQL, why it is beneficial, and how it differs from REST. He also offers answers to a series of commonly-asked questions about GraphQL.

Articles

From Rest to GraphQL

In this article, Charly Poly demonstrates how to move from REST to GraphQL in the context of a React application using Apollo Client backed by a Node server with Apollo Server. The article also covers how to use GraphQL Mesh, how to proxy a REST API, and how to secure a GraphQL Mesh server. Follow along with Charly to find out how you can move from REST to GraphQL with some advanced approaches.

Introducing: GraphQL Codegen plugin for TypeScript & SWR!

In this article, Yuta Haga demonstrates how to use graphql-request and SWR together using GraphQL Code Generator with a new plugin called graphql-codegen-plugin-typescript-swr. Yuta goes into detail about how this plugin can be used to achieve a great developer experience for React applications. Follow along to see how you can use graphql-request and SWR together in your React app.

What's new with Apollo Client v3 and GraphQL Codegen

In this article, Dotan Simha covers the new features found in Apollo Client v3 and how they can be used with GraphQL Codegen. Dotan talks about the possibleTypes API, type policies, ready-to-use hooks and higher-order components, and more. Follow along with Dotan to find out what's new in Apollo Client v3 and GraphQL Codegen.