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

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.

Articles

GraphQL Terminology - Cheatsheet

In this article, Ido Shamun provides definitions for a collection of common GraphQL terms. The cheatsheet is a great quick-reference guide for GraphQL beginners and experts alike.

How To Build a GraphQL API with Prisma and Deploy to DigitalOcean's App Platform

In this article, Daniel Norman demonstrates how to create a GraphQL API with Apollo Server and deploy it to DigitalOcean's new app platform. The tutorial also shows how to work with a database and type-safe database client with Prisma. Follow along with Daniel to find out how you can quickly build GraphQL APIs deployed to DigitalOcean.

Articles

RedwoodJS with Hasura = ❤️

In this article, Vilva Athiban PB demonstrates how to build a RedwoodJS app backed by a Hasura GraphQL API and database. He starts with the basics, showing how to bootstrap a Redwood app and create pages and then moves into configuring the Redwood app for use with Hasura. Follow along to see how you can use Hasura and Redwood together.

The Power of Serverless GraphQL with AWS AppSync

In this article, Slobodan Stojanović shows how to use AWS AppSync to build serverless GraphQL APIs. He goes into detail about what GraphQL is, including its history, and then moves into talking about the benefits of using serverless for GraphQL APIs. Follow along with Slobodan to find out how you can use AWS AppSync for your GraphQL APIs.

The Evolution of GraphQL at Scale

In this article, Andy Roberts provides a synopsis of how GraphQL apps are scaled in various scenarios. He goes into detail about monoliths, backend for frontend, schema stitching, and federation. Follow along with Andy to learn more about the options that are available for scaling GraphQL in your organization.

Scanning a GraphQL API for Vulnerabilities

In this article, Kevin Attard Compagno demonstrates how to improve the security posture of a GraphQL API by setting up automated scans with Acunetix. He starts by showing how to build a simple (and intentionally vulnerable) GraphQL API, how to create a database and seed it with data, and finally how to scan the API. Follow along with Kevin to find out how you can improve security for your own GraphQL APIs.

Articles

Building a GraphQL server with GraphQL Helix

In this article, Daniel Rearden demonstrates how to build a GraphQL server with GraphQL Helix, a newly released library for building GraphQL APIs. The aim of GraphQL Helix is to allow developers to use new features that are not yet supported in other libraries and to prevent vendor lock-in. Daniel starts with basic examples and gets into more advanced topics including subscriptions and multipart responses. Follow along with Daniel to learn more about how you can build GraphQL servers with GraphQL Helix.

Decision Guide to GraphQL Implementation

Development teams are increasingly choosing to build their APIs with GraphQL. In this guide, AWS provides an overview of the benefits of GraphQL to help you determine if it is right for your organization. They provide a walk through of what to consider when implementing a GraphQL API and whether you should host your own GraphQL server or choose a fully managed solution.

GraphQL Tools v7 delivers the next generation GraphQL API Gateway

In this article, Arda Tanrikulu goes into detail about how to use GraphQL Tools v7 to accomplish Schema Stitching. He talks about what Schema Stitching is, why it's a good abstraction to federate GraphQL services and how it relates to GraphQL Mesh. Follow along with Arda to find out more about Schema Stitching in GraphQL Tools v7.

To Federate or Stitch a GraphQL gateway, revisited

In this article, Greg MacWilliam goes into detail about the history and differences between Schema Stitching and Federation. He clarifies that Schema Stitching is still a viable option for GraphQL schemas since it has taken on new stewardship by The Guild. Follow along with Greg to learn more about the differences between Schema Stitching and Federation and how you can use them in your project.

Announcing the Release of Graphback 1.0

Graphback is a framework and generator that powers the GraphQL CLI and it has just reached version 1.0. In this article, Enda Phelan talks about what Graphback is, the benefits it offers over other libraries, and how to use it in a Node project. Follow along with Enda to learn more about Graphback and how you can use it.

Articles

What's new in GraphQL CLI 4.1

In this article, Enda Phelan covers new features in GraphQL CLI 4.1. He talks about the "serve" command, "init" command templates and other updates. Read on to find out how you can speed up your GraphQL development with the GraphQL CLI.

Articles

Offline-first made easy with GraphQL, Amplify DataStore and Vue

In this article, Gerard Sans shows how to create a Progressive Web App (PWA) that stores data on the device while offline and syncs it with a database when online. This is done with Amplify DataStore, GraphQL, and Amazon DynamoDB. Follow along with Gerard to learn how to build an offline-first Vue app powered by GraphQL.

The Dream Query: How we scope projects with GraphQL

In this article, Mark Larah talks about how Yelp uses GraphQL to scope new features. Mark goes into detail about the "Dream Query", a pattern that Yelp uses to help teams create features and refactor pages. He also talks about how Yelp uses graphql-faker to move quickly with new UI development.

How GraphQL Flexibility Gives Highly-Scalable Businesses a Competitive Edge

In this article, Martin Buhr talks about how GraphQL is advantageous for scalability. In particular, he details how GraphQL can be used with multiple microservices. Martin talks about how large companies like Airbnb and Expedia are using GraphQL to their advantage and also how GraphQL can be managed with API management.

Articles

Securing Your GraphQL Server

In this article, Eve Porcello talks about security considerations that developers should take into account when building a GraphQL API. She demonstrates how to implement request timeouts, how to put limitations on the amount of data returned, how to limit query depth and complexity, and more. Follow along with Eve to find out how to harden your GraphQL APIs.

How To Manage File Uploads In React With Google Storage And GraphQL

In this article, Nwani Victory demonstrates how to handle file uploads with GraphQL from a React front end. He talks about how to set up a GraphQL API in Node, how to implement the resolvers that are needed for file uploads, how to set up a Google Cloud Storage account, and how to initiate the upload from the React app. Follow along with Nwani to learn all the steps necessary for handling file uploads in your GraphQL app.

Articles

A Better Way to use GraphQL Fragments in React

In this article, Alec Brunelle talks about how to use GraphQL fragments in isolated React components. Isolated components, such as those built in React, should be responsible for defining the data they need to render. GraphQL fragments can be used to help achieve this goal. Follow along with Alec as he demonstrates how to use GraphQL fragments in React.

Articles

GitHub Mobile and GraphQL

In this article, Hesham Salman describes how GitHub has put GraphQL to use for its mobile applications. He goes into detail about how GitHub adopted a GraphQL mindset, what it was like to move from REST to GraphQL, how they have used code generation, and more. He also talks about how GitHub has used Apollo's tooling to be successful with GraphQL.

Server Driven UI, Part 1: The Concept

In this article, Joe Birch goes into detail about how to adopt a server-driven UI approach to building applications using GraphQL. He talks about what server-driven UI is, where it can be beneficial, and how you can create a GraphQL API to furnish this approach. Follow along with Joe to find out more about how you can use GraphQL APIs to your advantage when building user interfaces.

Introducing Obsidian: GraphQL, built for Deno

In this article, Travis Frank introduces Obsidian, Deno’s first native GraphQL caching client and server module. Obsidian is equipped with lightning-fast normalized caching to support scalable, highly performant SSR React applications built with Deno. Read on to find out more about Obsidian and how you can start using it today.

Articles

Ready to Scale: Refactoring GraphQL Schemas

In this article, Eve Porcello demonstrates how to refactor a GraphQL schema to make it easier for consumers to work with it. Having an easy-to-use schema is especially important when it is to be used across various teams in the same organization. Read on to find out how you can make your own GraphQL schemas easier to use and more scalable.

Advanced GraphQL Usage In Gatsby Websites

In this article, Aleem Isiaka goes into detail about GraphQL query constructs and how they are used with Gatsby. He also covers some advanced use cases for GraphQL in a Gatsby website by building out a fully featured blog site. Follow along with Aleem to learn more about how GraphQL works in the context of Gatsby.

Why we decided against GraphQL for local state management

In this article, Nick Brandt talks about why OkCupid decided against using GraphQL. Nick provides a great breakdown of what GraphQL is and why it's useful, including a discussion of how to think about state management with it. He then describes why OkCupid decided not to use GraphQL and the issues his team encountered. Read on to learn more about OkCupid's experience auditing GraphQL.

Articles

GraphQL on Azure: Part 4 - Serverless CosmosDB

In this article, Aaron Powell demonstrates how to build a GraphQL API that uses CosmosDB with Azure Functions. Specifically, Aaron shows how to use Azure's Function bindings--a way to have the Functions runtime provide you with a connection to another service in a read, write or read/write mode. Follow along with Aaron to find out how to build a GraphQL API with Azure Functions and CosnosDB.

Adding directives to the schema in code-first GraphQL servers

In this article, Leonardo Losoviz covers how to use schema directives in code-first GraphQL servers. A known drawback to building GraphQL APIs in a code-first fashion is that there is no natural support for Schema Directives. Follow along as Leonardo demonstrates how to use Schema Directives in a code-first GraphQL API built with GraphQL by PoP.

Journey to a Federated GraphQL

In this article, Artjom Kurapov covers how Pipedrive migrated to a federated GraphQL API. He talks about how they prepared for the transition, how they carried out the migration, and also the lessons they learned along the way. Check out this article to hear the story of how Pipedrive successfully carried out a move away from REST to GraphQL.