GraphQL is rapidly growing in popularity as the new standard for working with APIs, and it’s easy to see why! Performant and efficient, this groundbreaking API query language gives developers a single API endpoint to access exactly the data they need. Relationships and custom resolvers allow you to even further evolve your GraphQL API to access multiple data sources. With such extensibility, you can iterate even more quickly on front-end features your application users will love.

In this tutorial, we’ll walk through a comprehensive example starting only with data and build out an entire site using GraphQL - showing why it’s become so popular.

We’ll start by setting up a hosted, serverless, and secure GraphQL API for our data in minutes. Then we will extend that API with relationships to other data collections and custom resolvers in order to bundle together different data sources and APIs together under the same schema. Finally, we will build out a web application using our GraphQL endpoint to demonstrate how GraphQL gives us exactly the data we want - nothing more, nothing less.

Along the way, we’ll learn how to

  • automatically generate JSON schema for your MongoDB collections.
  • create types and resolvers for that data.
  • define custom query resolvers to access other databases or 3rd party APIs.
  • test your schema using the GraphiQL interface inside the Atlas UI.

#graphql

GraphQL: The Easy Way to Do the Hard Stuff
1.05 GEEK