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.
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.
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.
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.
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.
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.
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.
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.
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.
In this article, Andy Li demonstrates how to create a simple GraphQL API and consume it in a Vue application. He talks about the problems that GraphQL solves, how it compares to REST, the tooling that exists to work with GraphQL, and how Vue factors in. Follow along with Andy to find out how to work with GraphQL APIs in a Vue app.
In this article, Mukesh Murugan talks about how to work with GraphQL in an ASP.NET Core application. He talks about what GraphQL is, how it compares to REST, and provides detailed guidance on how to set up a project. Follow along with Mukesh to learn how to build a GraphQL API using ASP.NET Core.
In this article, Felipe Laso-Marsetti demonstrates how to consume a GraphQL API in an iOS application in a type-safe way. He explains how to set up the project, create and run a GraphQL server, set up codegen, run queries, and much more. Follow along with Felipe to find out how to use GraphQL in an iOS application.
In this article, Muhammad Ali thoroughly covers how to add authentication to a Nexus GraphQL API. He goes into detail about how to add signup and login functionality, how to use OAuth 2.0 with providers like Facebook and Google, and how to manage user roles. Follow along with Muhammad to learn how to secure your Nexus GraphQL APIs.
In this article, Ritesh Sharma guides us through how to build a Flutter app that uses a GraphQL API. He covers some high-level concepts of GraphQL backends including how to set up a schema and how to create resolvers. He then covers how to execute queries and mutations from a Flutter app. Follow along with Ritesh to find out how to use a GraphQL backend in your Flutter apps.
In this article, Yan Cui describes his approach to modelling access control in AWS AppSync apps. He goes into detail about the challenges of modelling data access requirements, why it can be challenging to apply rules using the GraphQL SDL, and how this can be overcome using nested query and mutation types.
In this article, Alex Lau covers how to build a React app backed by a GraphQL API that gets data from a FaunaDB database. He walks through how to provision the database, how to create the GraphQL Schema within FaunaDB, and how to deploy the app to Heroku. Follow along with Alex to discover how to back your GraphQL APIs with FaunaDB and consume the API in a React app.
In this article, Felippe Rodrigo Puhle talks about how his team improved the performance of their React Native app by using GraphQL and Relay. He talks about how the app lacked memoized selectors and how Relay helped to implement them, how the team migrated only a portion of the app, and what the benchmarks show for improvement.
In this article, Leonardo explains the benefits of the Nexus Schema – a declarative, code-first, and strongly typed GraphQL schema construction library. He delves into the difficulties in building GraphQL APIs and the tradeoffs between approaches to designing a GraphQL schema, namely Code-first and SDL-first. The article also demonstrates the different aspects of code-first schema construction with Nexus Schema. Check it out to get a better understanding of the different approaches.
In this post, Mandi Wise goes on a tour of how authentication and authorization can be handled with a GraphQL API using Express and Apollo Server. Specifically, Mandi shows how to handle incoming JWTs in an Authorization header and pass that decoded data down the graph to resolvers. Additionally, how to keep authorization checks out of resolvers functions by abstracting them into a middleware layer. The post is based on the code Mandi demoed during GraphQL Summit 2020. You can find the link to the recording of the talk in the article.
Running peak capacity load testing across a full GraphQL API surface can be a challenge due to key differences with traditional REST / HTTP APIs. The optimal test scenario is to harvest live traffic and then replay it at scale to stress systems end-to-end and suss out issues. However, whether an operation is safe for capture and replay in the case of GraphQL isn't something you can derive from the HTTP envelope of requests and the standard HTTP verbs. In this article, Pat McCarthy describes a runtime directive-driven approach that Vrbo uses to effectively support weekly peak capacity tests across their production infrastructure. The testing has put Vrbo in a great position for dealing with load spikes effectively, and has led to major improvements in their end-to-end reliability across their customer journey.
8base's GraphQL API now supports GeoFields, allowing developers to build location-based apps easily with built-in distance and bounds capabilities. This makes both filtering by geographical bounds/coordinates a breeze, as well as allows developers to return distance calculations in their API responses. In this article, Sebastian Scholl describes the new features added to 8base's GraphQL API and how developers can be successful using GeoFields. He goes into detail about how to apply location-based filtering and queries, how to do distance calculations, how to perform atomic operations, and more. Follow along to find out how you can use the new GeoFields features from 8base.
In this article, Radoslav Stankov talks about how Product Hunt tests their GraphQL API using a set of Ruby testing helpers. He goes into detail about how his team tests three categories of API code, including helpers, mutation classes, and resolver classes. Follow along to find out how to test your Ruby GraphQL APIs so you can gain confidence that they work as expected.
In this article, Sebastian Kurzynowski provides his impressions on using Hasura as a realtime GraphQL API and also gives a brief tutorial on how to get up and running with it. The tutorial demonstrates how to set up authentication, how to use the Hasura GraphQL engine, and how to use Hasura actions. Follow along to find out the benefits of using Hasura and how to get started.
AWS has just released Direct Lambda Resolvers, a solution that allows developers to build an AWS AppSync GraphQL API without the need to learn and understand VTL templates. In this announcement article, Ed Lima walks through how AWS AppSync can be beneficial for creating GraphQL APIs, the problems that arise when needing to understand VTL templates, and how developers can now create resolver logic without any VTL.
In this article, Marc-André Giroux provides an in-depth guide on handling errors in GraphQL. The GraphQL community has not yet settled on standard conventions for errors which can cause confusion for developers when building a GraphQL app. Marc-André's guide helps to demystify common areas of confusion and provides readers with some established best practices for GraphQL error handling.
In this article, Gabriel Colson demonstrates how to build a real-world GraphQL API with Nexus Schema and Prisma. The tutorial provides a deep-dive on application architecture, project setup, and finally implementation. Follow along with Gabriel to learn how you can easily build production-ready GraphQL APIs backed by a type-safe database access layer using Prisma.
In this article, idk.dev covers how to add access control to a GraphQL API built on AWS AppSync. It goes into detail about how access control should be handled, how to have AppSync verify a JSON Web Token, how to handle API keys, and more. Follow along to find out how to secure your AWS AppSync GraphQL APIs.
In this article, Blessing Krofegha does a deep-dive into how to use Apollo Client in React applications. He outlines the basics of GraphQL and how Apollo Client fits into a React application. The tutorial takes readers through how to build a React app with Apollo Client and includes instructions on queries, mutations, and how to handle the cache.
In the second part of his tutorial series, Samuel Goodwin demonstrates how to set up a GraphQL API hosted on AWS AppSync. He goes into detail about the benefits of AppSync as a managed service, what some of the downsides are, and how to create and deploy a GraphQL API on it. Follow along with Samuel for in-depth instructions on how to use GraphQL on AWS AppSync.
FaunaDB is becoming an increasingly popular database choice for use with GraphQL. In this article, Rami Shashati shows how to build a full-stack application with Nuxt, Vue, and FaunaDB, all with GraphQL. Follow along for an end-to-end example of building a GraphQL app using these popular technologies.
In this brief tutorial, Danilo Woznica shows how to generate both TypeScript types and React hooks from a GraphQL schema. He talks about what graphql-codegen is, how to set it up in a new project, and how to configure it to output types from a given schema.
In this tutorial, Mason Goetz covers how to use Apollo for global state management in a React application built with TypeScript. He covers how to set up local queries and mutations, how to use the GraphQL schema locally for type definitions and codegen, and how to use graphql-codegen to create custom hooks.
Apollo has just announced the official release of Apollo Client 3.0. The major version bump brings package consolidation, improvements to the InMemoryCache APIs, improved local state management, and improvements to UI reactivity. Follow along as Ben Newman goes in-depth on the changes in Apollo Client 3.0, including some extensive code samples.
Searching through related Kubernetes resources can be complicated with existing tools. In this article, Hiroyuki Osaki explains why GraphQL is a good candidate for making this task simpler. He also demonstrates how to set up a working Kubernetes search client using GraphQL.
Gatsby recently announced their new plugin for WordPress which is now in beta. One of the ways to use the plugin is with GraphQL using WPGraphQL by Jason Bahl. This article covers some of the technical details around the WPGraphQL plugin and how it interacts with WordPress data. Specifically, with the WPGraphQL plugin, WordPress can be used as a headless CMS. The article also gets into some of the motivations behind WPGraphQL and the benefits it offers over REST.
Hasura has just released their managed cloud service based on the popular Hasura GraphQL engine. With Hasura Cloud you can offload many of the operational concerns that hosting a GraphQL server requires, like maintaining servers rate-limiting, high-availability, monitoring, tracing, and caching. Hasura cloud adds support for caching with a @cache directive that can be added to GraphQL queries making it like a CDN for dynamic data. Check it out to learn more about how Hasura Cloud makes the GraphQL server an invisible part of your infrastructure.
Data modelling is an necessary skill at all levels of the software development stack. Typically it's done prior or during implementation of services. In this piece, Andrew does an interesting exercise of doing the reverse – deriving a GraphQL data model by looking at single screen or page from an app. Read along if you're looking to level up your data modelling skills or have a better understanding of the mapping between UIs and a GraphQL API.
In this article, which is part of a series about different aspects of GraphQL implementations, Leonardo delves into an often overlooked feature: GraphQL specification–directives. Leonardo argues why directives are among the most powerful features in GraphQL, showing how they can enhance and empower our APIs, and explaining why servers with good support for custom directives will lead the way into the future of GraphQL.
In this opinion piece, Drew, author of the open-source software development platform SourceHut, offers a glimpse into the role of GraphQL in SourceHut's development and architecture. Drew details the opportunity represented by migrating from Python backends that communicate directly with PostgreSQL to backends that communicate with a GraphQL API that serves as a single source of truth. He reasons this incremental change as one that could substantially increase his confidence in the system while improving performance and reliability.
Learn more about the landscape of tools that map GraphQL to SQL. As GraphQL gains wider adoption, many tools and patterns emerge to ease the job of mapping GraphQL queries to SQL queries. In this thoughtful article Marc-André Giroux, the author of Production Ready GraphQL, explores the popular tools, the different features they offer, and reasons why some tools are better fit for new projects and others for adoption in existing codebases.
In this article, Sezgi goes into what nulls mean in GraphQL and the spec's approach to nullability and error handling. Read more about how that connects with the approaches taken by Apollo and Relay. An interesting read for those looking to master nulls in GraphQL with a useful cheatsheet for quick reference.
GraphQL makes it easy for clients to fetch data from servers. But how does a GraphQL server source that data in the first place? Apollo Server data sources are a collection of classes that encapsulate the code for interacting with different data services, e.g. Mongo DB, REST API. Read along to learn about the current state of data fetching and how to write your own data source library
The GraphQL connection specification is a pattern for implementing cursor-based pagination. This article by Andrew Ingram addresses common misconceptions around it and the reasons for choosing connections as a pagination implementation over limit-offset pagination. Check it out to learn about the patterns, the role of edge types, and GraphQL schema examples.
In this article, Christoph suggests persisted queries as an approach to improving the security (and performance) of GraphQL APIs. The working argument is that while GraphQL provides a lot of flexibility, it also exposes a lot of information that can increase attack vectors. The approach suggested is a kind of security through obscurity whereby instead of sending queries to the API, you send the hash of a query and the API maintains a list of allowed query hashes. The article covers some of the limitations of this approach and similar solutions in the ecosystem. Follow along for an interesting read.
Designing the GraphQL schema is often the first step in your app development journey using GraphQL. This guide presents an intuitive, straightforward process to design your GraphQL schemas and modify them as your application UIs become increasingly complex.
This blog post introduces a technique to add custom business logic to your GraphQL API with Hasura Actions. Understand all the benefits of this architecture, such as the ability to work on new or existing databases, specify Hasura authorization rules, and be served by a serverless function. Check out how to get started with Hasura and actions with the documentation provided at the end of the blog!