Mastering GraphQL

Efficient Query and Manipulation Language

/logos/graph-ql.png

GraphQL

GraphQL is a powerful data query and manipulation language, created by Facebook. Essentially GraphQL is an alternative to REST. GraphQL exceeds REpresentational State Transfer because it facilitates data queries which manipulate the shape of returned data from a web api. It allows web API-driven applications to be structured in a much more flexible and efficient way.

The Client Decides what Data to Receive

GraphQL can operate over HTTP, like REST. Because the client can define the shape of data, an operation that may have required multiple REST queries can be accomplished in a single query with GraphQL. Flexible data querying means less code to maintain. Instead of multiple API endpoints, GraphQL can use one API endpoint.

GraphQL Operations Terminology

  • Query - fetch data (get)
  • Mutation - modify data (create / update / delete)
  • Subscription - Watch for data changes in real time
/Screenshot_2019-10-05_13-19-00-graphql-editor.png