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

Articles

GraphQL Resolvers: Best Practices

A detailed dive into resolvers, and a kickoff article to a series about Paypal's best practices and observations for building GraphQL APIs. Offering some tips and guidance for understanding how common practices could end up being inefficient, the article covers fetching and passing data in resolvers and subsequently illuminates the points with some examples. A great read for a well-written summary of effective resolver practices.

Our learnings from adopting GraphQL

Describing how GraphQL supports the buzzing engine of the Netflix Marketing Tech team (covered in a fascinating series in its own right: part 1 and part 2), this blog post explains the benefits offered by GraphQL for the internal application that creates and manages Netlfix ads, called Monet. It also covers the challenges that GraphQL brought with it: such as duplicate network requests, difficulty debugging code due to abstraction, and the impact of partial objects fetched with GraphQL.

GraphQL Stitching 101

An interesting overview of schema stitching in production! Reading this article, which covers both schema stitching and schema merging rooted in examples and experiences from artsy, one comes away with an understanding of the ways to apply and use schema stitching as well as how to validate that the process was done successfully.

Articles

GraphQL: A Retrospective

After a migration two years ago from a legacy PHP system to GraphQL and Python, Verve recounts their experience with GraphQL, sharing how they implemented a stateless API gateway for their code. Explaining their rules for their backend API, and transparently covering some of the challenges they've faced in the build out, this blog post is an exciting piece that highlights, once again, the power of GraphQL to help teams move faster with greater autonomy.

ReasonML with GraphQL, the Future of Type-Safe Web Applications

For those curious to explore more with ReasonML and GraphQL, Ian Wilson has created a helpful tutorial on creating a small web app with a GraphQL endpoint and using ReasonML. A helpful walkthrough, the piece sets you up to create an app to track video games you've finished (a fun take on the classic to-do list) and offers some helpful resources to continue learning ReasonML.

Articles

Using graphqlgen for our cloud stack

After Prisma's announcement of graphqlgen a couple of weeks ago, this article dives into how Meeshkan uses it within their cloud stack. This article goes over some key takeaways Meeshkan had working with graphqlgen and offers both examples and instructions on how to implement it oneself. A really great article to read to get a better understanding of resolvers in Apollo Server, graphqlgen; and it features a little bonus section unit testing your resolvers.

Building an API with GraphQL and Go

In his post, Bradford Lamson-Scribner offers a step by step guide to setting up an API using Go, GraphQL, and PostgreSQL, playing around with a small amount of dummy data. This tutorial provides a handy and straightforward walkthrough for anyone seeking to get started with Go and GraphQL.

Articles

Discovering GraphQL endpoints and SQLi vulnerabilities

Matías Choren covers the way that individuals can confirm that GraphQL is being used and some SQL injections that may affect it. A sobering reminder that security should be top of mind no matter the tool in use.

Full Schema Stitching with Apollo Server

A post that cover stitching queries, mutations, and subscriptions from an Apollo Server and its Links packages, focused on the core of schema stitching. For those new to schema stitching, one can find a broader introduction here.

Articles

Deploy a Fullstack Apollo app with Netlify

Sashko Stubailo dives into setting up a "Hello World" API for an Apollo app on Netlify. Netlify allows you to hook into AWS Lambda and the possibilities of serverless, resulting in a final product that easily scales to production workloads. An interesting use case to read through.

Creating a TypeScript API that consumes gRPC and GraphQL via generated types

This article by Noel Veranda demonstrates how to get a fully end-to-end Typed API, written in TypeScript with types generated for the entire application. Noel also shows readers how you can use these types on any front-end clients, the issues encountered during implementation, and how the overall experience has been.

A Guide to GraphQL in Plain English

Have friends who still aren't familiar with GraphQL? 🧐 This guide from freeCodeCamp has an approachable introduction that you can share to help get them started!

Articles

Build a Full GraphQL Server with Node.js

While there are many articles on setting up a GraphQL server, Jack Scott has published one with all of that useful information compiled into a single detailed guide on setting up a production server. This comprehensive article covers topics from creating a basic GraphQL structure and making queries and mutations, to connecting a database and adding authentication and authorisation. This is a great article for people seeking a full introduction to GraphQL servers and is packed with helpful links to learn more.

A Gentle Introduction to GraphQL API Integrations

Hugo di Francesco shares a quick introduction to the core concepts around consuming a GraphQL API. This is an example heavy article and a great reference!

Articles

How to use arrays in GraphQL (GraphQL Modifiers)

In this article David Mraz goes through modifiers, a special group of types which allows users to modify the default behavior of other GraphQL types. In GraphQL we deal with various types, such as scalars and custom scalars, enums, objects and input object types, and more abstract types - interfaces and union types. Check out this article to learn how you can leverage these types in your application!

Layering GraphQL on top of REST

Building a universal GraphQL API on top of your existing REST APIs and backends allows you to ship new features without writing new endpoints or waiting for backend changes. This post from Prosper Otemuyiwa walks you through writing a GraphQL API on top of an existing PHP backend! It's a must read for engineers transitioning to GraphQL from a previous REST-based architecture.

Articles

Building Trending Activity Feeds Using GraphQL And Neo4j

This post by William Lyon shows how the Neo4j developer relations team built out a trending activity feed feature on the Neo4j Community Forum. This is an awesome article because they go in depth on their 'GraphQL First' development approach. William breaks down the APIs of this feature and shows off their view of the GRAND stack. Check this out!

Articles

Improving Scalability: Up to Four Times More Throughput in Prisma 1.14

The latest release of Prisma contains many performance improvements making 1.14 the fastest version ever. This release brings significant improvements for both throughput and speed. When your Prisma server is operating under normal load, v1.14 reduces the time to resolve a single query by 35%. Prisma is now able to execute 4 times as many requests as before while maintaining single digit millisecond execution time.

Multiple Apollo Clients with React?

This article from Alejandro Estrada explains an alternative approach to the common GraphQL architectural pattern Schema Stitching. In this post, Alejandro walks through how easy it is to embed multiple Apollo Clients in your application. Along with that, Alejandro goes through the API Gateway approach and a unique take on client-side schema stitching.

GraphQL Gateway Architectures

This article from Tomas Alabes is all aboutGraphQL Gateway Architectures. GraphQL Gateways have been really crucial for supporting larger architectures in the GraphQL community. Thomas outlines Remote Schema Stitching, using Prisma's GraphQL Bindings, and much more.

How We're Constantly Improving the Performance of Prisma | Prisma

Fast and predictable performance is crucial for software to succeed. Therefore, ensuring great performance is of Prisma's key goals. This post discusses the practices and tools used by the Prisma engineering team to make sure that their software meets high performance standards.

Articles

A 5 Line "hack" for your GraphQL resolvers

In this article, Vampiire walks through a simple enhancement you can add to GraphQL resolvers interacting with your database via Sequelize. He explains that by using the info object from a resolver, you can map those incoming fields in your GraphQL query to your database query. Overall he saw a 94% reduction in database load for these type of resolvers. Check it out!

GraphQL security in Node.js project

In this article from David Mráz explains a common threat model in GraphQL applications. Potential attackers could make complex queries that could put tremendously load on your servers. David explains some awesome tips to secure your GraphQL server from potential attackers.

Articles

Dealing with N+1 in GraphQL

This article from Radoslav Stankov aims to pose a common question when engineers start leveraging GraphQL in their APIs: What about N + 1 queries? An engineer at Product Hunt, Radoslav dives into what N + 1 queries are and how they can be remedied with the GraphQL::Batch ruby gem from Shopify.

Debugging complex GraphQL queries with short-links into GraphiQL

This article from Nils Norman Haukås demonstrates how you can intercept requests made in local GraphQL development flows to create short-links in your terminal. These links allow you to quickly open incoming GraphQL queries in your GraphiQL editor. The end result is a heightened developer experience where your GraphiQL editor is pre-filled with the query and any accompanying variables.

Learn to Build a GraphQL Server with Minimal Effort

In this awesome introductory post from Ian Wilson, readers can expect to start with GraphQL from the ground up. Start with understanding the GraphQL basics and progressively build up your knowledge. This article is perfect for newcomers to GraphQL interested in going from zero to development!

GraphQL on the server from Joyent

This article from joint authors Wyatt Preul and Lloyd Benson of Joyent Inc, explains approaching GraphQL from a REST background. They go through a simple query and show the implementation on the server. In order to help make it easy to get started with GraphQL in Node.js with existing hapi.js engineers they have created graphi, a hapi.js GraphQL server plugin. Check it out today!

Articles

Generate Strongly Typed React Components with GraphQL

In this article, Mat Warger discusses how to generate strongly-typed React components to enforce the type definitions of your GraphQL server. Leveraging GraphQL you can be sure that your props and state are what you expect, at build-time, and code your components to match that interface.

GraphQL Introspection

This multi-part article from David Mraz dives into the deep details of GraphQL's introspection query. David explains the anatomy of an introspection query diving from the semantics to it's utilization in GraphQL servers.

Articles

Why We Advised Our Customer Against GraphQL

In this article, Anshulee Asthana explains a case study of a product that evaluated switching their existing APIs to GraphQL. While the teams were excited to implement a new style of API technology, Anshulee describes the many more reasons why that switch may not be optimal for mature projects. Checkout an interesting look at a technology decision and decide if you would have done things differently.

Introducing @defer in Apollo Server

The @defer directive is a way for developers to mark parts of GraphQL queries as expensive, so instead of holding back the response, those fields are resolved asynchronously and get streamed as patches to the client. In this article, Clarence Ngoh of the Apollo Team explains the use cases for @defer and how you can get started! Make your products better by checking this article out!

Articles

GraphQL with a Functional Backend

In this article, Sean Handley shows off some of the work he's been doing at Stuart integrating Elixir with GraphQL. Sean first gives a primer on GraphQL and then more details about the reference implementation for Elixir called Absinthe. Check it out if you've been wanting to dive into Absinthe!

Choosing a GraphQL server in Go

In this article by Dai Shi, several GraphQL libraries are explored with the aims of using GraphQL with the Go Language. Dai explores 5 Go implementations documenting how an engineer would write a simple resolver.

Articles

GraphQL Bindings for Service to Service Communication

A GraphQL binding is a minimal, auto-generated GraphQL client for a specific GraphQL API. In this article, Abhi Ayer explains how GraphQL bindings are used for service-to-service communication at Workpop.

Modularizing your graphQL schemas

Did you ever wonder how to distribute your SDL type definitions across multiple .graphql-files in order to keep your project structure clean and modular? Let Tomas Alabes teach you how you can use the graphql-import library for that purpose.

Why GraphQL: Advantages, Disadvantages & Alternatives

If you're not sure whether GraphQL is the right choice for your next project, you need to read this article! Robin Wieruch gives a great overview of the advantages and disadvantages of using GraphQL and also presents some alternatives.

Articles

Protect GraphQL Properties With JWT In A Node App

Access Control is a huge concern for web applications. Engineers using GraphQL find themselves figuring out how to protect their queries from the general public via roles/permissions. In this article Nic Raboy provides a guide for securing NodeJS GraphQL applications with JSON Web Tokens (JWT).

File Uploads with Apollo Server 2.0

File uploads are one of the most common requirements for modern web applications. Recently the GraphQL community has been trying to integrate this feature into their applications but have hit a wall as the GraphQL specification does not describe this behavior. In this article Prosper Otemuyiwa demonstrates built in file upload support in Apollo Server 2.0 inspired by the apollo-upload-server module.

Top 5 GraphQL Scalars

In this article Abhi Aiyer describes the use cases for custom scalars in your GraphQL applications. Custom Scalars allow you to encode product data expectations in your type system pushing this complexity from the client to your GraphQL server. Abhi further discusses 5 useful custom scalars that can help your product development.