Difficulty: Intermediate
Estimated Time: 15 minutes

GraphQL is an open-source data query and manipulation language for APIs that allows clients to understand the data that your APIs expose and ask for only the portions they want. With GraphQL, you can create applications and services to aggregate data from multiple services or data stores. The Stargate open source project provides an API layer that allows you to expose a GraphQL API on top of any Cassandra database. Astra DB now offers offers a GraphQL API via Stargate, which we explore in this scenario.

We'll use the GraphQL API to:

  • Create tables and records
  • Read records from the tables
  • Update records
  • Delete records

As a prerequisite, be sure to setup an Astra account and create a Cassandra as a Service database at astra.datastax.com.

GraphQL is great stuff! Let's take a look.

This scenario is also available on our datastax.com/dev site, where you can find many more resources to help you succeed with Apache Cassandra™.

Code Complete

You're all set!

Thanks for taking a tour of Stargate's GraphQL API on Astra DB! For more details and elaboration of the GraphQL API features check out the Stargate documentation.

For more information and details on using the GraphQL API on Astra DB read the documentation.

Please give this scenario a rating (click on the stars near the top).

Have questions or more feedback? Send us a message.

Getting Started with Stargate GraphQL API for Apache Cassandra™

Step 1 of 7

Watch an introductory video on the GraphQL API

Here's a short video that shows how to use the GraphQL API.

You can enlarge the video to full-screen by clicking in the bottom-right corner of the video.

Now, you give it a try!