What is GraphQL?

Query and manipulate application data easily

GraphQL

What is GraphQL?

GraphQL is a query and manipulation language for APIs. GraphQL provides a flexible and intuitive syntax to describe data requirements and interactions. It enables developers to ask for exactly what is needed and get back predictable results. It also makes it possible to access many sources in a single request, reducing the number of network calls and bandwidth requirements, therefore saving battery life and CPU cycles consumed by applications. 

Making updates to data is made simple with mutations, allowing developers to describe how the data should change. GraphQL also facilitates quick set up of real-time solutions via subscriptions. All of these features combined, coupled with powerful developer tools, make GraphQL essential to managing application data.

 

Building Modern APIs with GraphQL

How to GraphQL on AWS?

Decision Guide to GraphQL Implementation

Is GraphQL right for your organization? Walk through the main considerations for implementing GraphQL APIs, and explore the pros and cons of self-hosted vs. fully-managed solutions.

How to Build GraphQL Resolvers for AWS Data Sources

Learn how GraphQL resolvers are used to connect to data sources like Amazon DynamoDB, Amazon Aurora, and AWS Lambda. Explore differences in building with a self-managed GraphQL server vs. a fully-managed service.

How to Design an Amazon DynamoDB Data Model for a GraphQL API

Learn how to evaluate the two approaches to integrating DynamoDB with GraphQL: multi-table and single-table. Explore the advantages and drawbacks of each approach to help you choose the right one for your application.

How to Use GraphQL Subscriptions to Build Real-Time Apps on AWS

Learn the capabilities of GraphQL subscriptions for powering interactive, real-time application experiences like chat, geo-tracking, virtual ed-tech solutions, telehealth, social gaming, score, and price updates.

How to Create a Serverless GraphQL API on AWS

Learn how to build scalable serverless GraphQL APIs to securely query and update AWS data sources like Amazon DynamoDB and Amazon Aurora RDS.

Building Serverless APIs on AWS

Using serverless architectures to build APIs is a rapidly growing trend. Learn how to manage the business logic for AWS serverless APIs, including options for implementing REST-like and GraphQL APIs on AWS.

Serverless API Security, Authentication, and Authorization on AWS

Review best practices and options for securing your serverless APIs on AWS, including API security, authentication types, and patterns for fine-grained authorization.

Front-End Developer Guide Series for Building on AWS with AWS AppSync

8-part guide series containing step-by-step tutorials for front-end developers building full-stack apps on AWS with AWS AppSync.

1. Why your next Micro-SaaS should be powered by AWS

Read this guide series introduction to learn how to build fully-typed, full stack, cloud-connected apps on AWS, using Next.js, AWS Cloud Development Kit, AWS AppSync, Amazon DynamoDB and Amazon S3. 

4. AWS CDK for Front-End Developers: Databases and Serverless Functions

In this 4th guide, we will leverage AWS CDK constructs to create DynamoDB tables and a serverless function, along with necessary roles and policies.

7. AWS CDK for Front-End Developers: Building Modern APIs with AWS AppSync

In this 7th guide, we'll introduce AWS AppSync and walk through how it relates to GraphQL as well as how it helps integrate your app with the AWS ecosystem. 

2. Getting started: How to install the AWS CLI and configure a CDK TypeScript project

In this 2nd guide, we will walk through how to get started with AWS Cloud Development Kit, starting with creating an AWS user and installing the AWS CLI. 

5. The AWS CDK Guide to Authentication & Authorization for Front-End Developers

In this 5th guide, we will walk through how to use Amazon Cognito to build authentication and authorization into your app.

8. AWS CDK for Front-End Developers: Multi-Stage Deploys with Github Actions

In this final, 8th guide, we will deploy our environment to AWS.

3. AWS CDK for Front-End Developers: The Ultimate Guide to Get You Started

In this 3rd guide, we will see how this guide series will flow and tour what we're building. Then we will setup our CDK project so its flexible to iterate on in later chapters.

6. AWS CDK for Front-End Developers: Amazon S3 and CloudFront

In this 6th guide, we will see firsthand how simple creating an S3 bucket with a Content Delivery Network is, and also discuss security aspects.

Start Building with our Starter Sample Application

Let's start building with a sample recipe app!

Why use GraphQL?

GraphQL can be used to build modern web and mobile applications faster by simplifying data management. Developers can query and retrieve multiple pieces of information across different sources in a single network request, ensuring faster response times even on slow connections. In a GraphQL request, developers can specify how to structure the data when it is returned by the server. This makes it possible for to query only the data needed, in the format needed.

 

Faster development

GraphQL enables you to drastically reduce the number of endpoints required to manage your application data needs. You can retrieve or manipulate data across multiple resources with one single request. GraphQL also allows developers to discover the data available, queries supported, and data types without requiring knowledge of the backend.

Greater flexibility

GraphQL allows you to change your data types and structure without impacting existing queries or backend schemas. You can easily add new fields and types to an existing API without changing your front-end code or creating new versions of your API. GraphQL is not tied to any specific database engine, platform, or codebase so you to use it in many scenarios.

Easier data management

GraphQL allows you to request and receive just the data you need, when you need it. There is no over-fetching or under-fetching of data giving your application overall improved performance. GraphQL lets you specify which portions of your data should be available in real time using Subscriptions, eliminating the need to build complex distributed architectures.

When to use GraphQL?

GraphQL is applicable to all types of mobile and web applications across industries, verticals, and categories where the apps require data from multiple sources, real-time data updates, and offline capabilities. Here are some examples of apps that can particularly benefit from being built with GraphQL:

Real-time applications

GraphQL makes building applications that rely on real-time data, like social media or chat, easier by enabling subscriptions across multiple devices, as well as offline access to data. GraphQL can also help by managing application messaging among multiple users with a variety of data types and sources.
 

Data driven applications

GraphQL creates a single point of entry for all data sources and microservices, so you can build applications that rely on multiple and heterogeneous data sources faster. 

Mobile backends

GraphQL optimizes network requests by minimizing the number of queries required to retrieve data from your backend. It also allows you to specify how to structure the data to be received so your application only receives the data it needs, resulting in better network utilization and performance, especially on mobile devices. 

Looking for a fully managed GraphQL service?

Explore AWS AppSync

Explore AWS AppSync

AWS AppSync is an enterprise level, fully managed serverless GraphQL service with real-time data synchronization and offline programming features. AppSync makes it easy to build data driven mobile and web applications by securely handling all the application data management tasks such as real-time and offline data access, data synchronization, and data manipulation across multiple data sources.