Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Introduction

GraphQL is a data query language for APIs that can be used with any language and framework. It can be used anywhere a client communicates with an API and makes API communications more efficient. GraphQL was developed to meet the need for more flexibility and efficiency in client/server communications. 

You can use GraphQL (via a single endpoint) to:

  • Retrieve data (via a “query”)

  • Add, update, or delete data (via a “mutation”)

  • Specify the exact data you want

GraphQL is a new API standard that provides a more efficient, powerful and flexible alternative to REST (Representational State Transfer)*.

*Courtesy of GraphQL EdEx Course

Introduction to GraphQL API

There are many resources available to help you learn GraphQL. In their documentation, you’ll find a series of articles that explain essential GraphQL concepts and how they work. They also have a Community page full of resources to reference and groups to join. For more practical guides, visit the How to GraphQL tutorial website. They also have a free online course with edX, Exploring GraphQL: A Query Language for APIs.

GraphQL is organized in terms of schema and type system versus Rest API endpoints.

(blue star) GraphQL has its own type system that’s used to define the schema of an API. The syntax for writing schemas is called Schema Definition Language (SDL).

The schema is one of the most important concepts when working with a GraphQL API. It specifies the capabilities of the API, the shape of the available data, and the specific queries and mutation functions that can be used to read, write and make web requests from a GraphQL server. GraphQL enables users to specify exactly what data they get back in their response—nothing more, and nothing less, and it allows querying for multiple fields in a single request.

  • No labels