HomeLearnYoutube VideoGraphQL: The Easy Way to Do the Hard Stuff

GraphQL: The Easy Way to Do the Hard Stuff

Published: Aug 07, 2020

GraphQL is the easy way to do the hard stuff for developers! In this tutorial, we show how to set-up and manage a hosted, serverless, and secure GraphQL API in minutes. Then we will extend it with relationships to other data collections and custom resolvers to bundle together different data sources and APIs together under the same schema. Finally, we will build out an entire web application using our GraphQL endpoint to demonstrate how GraphQL gives us exactly the data we want- nothing more, nothing less. To follow a written version of this tutorial and to find the code so you can build for yourself, check out https://developer.mongodb.com/how-to/graphql-easy 0:00 Introductions 3:28 Be Like Brian 6:04 Agenda - Why GraphQL is Awesome - How to Create a Schema Securely in Realm Interface - How to Query and Test that Schema - How to Extend the Schema with Relationships and Custom Resolvers - How to Use it in an Application 8:02 Let’s Start with REST APIs - Twitch example 9:02 Real problems with REST APIs - break apps, bloated payloads 10:54 The Inevitable Food Metaphor: Benefits of GraphQL - Avoid over-fetching, retrieve related data, custom resolvers for specific 3rd party data 16:11 Let’s Start with the Data - customers and accounts collections and how they relate 21:02 Prepare to Expose Data by Creating Schemas 21:22 Create a Realm Application 21:52 Enable Built-In User Authentication 22:02 What is a Realm Application? 22:56 What is Anonymous Authentication and How is it Different from Other Authentication? 24:50 Create Access Rules for Your Data Collections 25:40 What is a Schema and How to Generate One and Validate in Atlas interface 29:30 Create a Custom Schema Configuration 32:10 Test out in Atlas UI’s GraphiQL Interface 33:00 Automatically Generated Documentation for Queries and Mutations 35:29 Use Tested GraphQL Query Inside Client Application 37:16 Insert GraphQL Endpoint and Realm AppID in Client Application 42:00 Create a Relationship from ‘customers’ Collection to ‘accounts’ Collection 49:46 Create Custom Resolvers in Your Schema from 3rd Party APIs 57:45 Use New Query Enriched with Custom Resolver in Application 1:00:50 Final Hosted Application also Taking Advantage of Atlas Search for Auto-completed Customer Names #Realm #GraphQL #customresolvers #MongoDB This is an on-demand video for a Twitch stream featuring Karen Huaulme and Nic Raboy. To watch streams live, follow the channel at https://www.twitch.tv/mongodb

MongoDB Icon
  • Developer Hub
  • Documentation
  • University
  • Community Forums

© MongoDB, Inc.