# GraphQL in Depth: What, Why, and How

DevFeed: [GraphQL in Depth: What, Why, and How](<https://devfeed.tech/articles/graphql-in-depth-what-why-and-how-21877.md>)

Original publisher: [Read original article](<https://ponyfoo.com/articles/graphql-in-depth-what-why-and-how>)

Author: ryan.glover@cleverbeagle.com (Ryan Glover)

Published: 2019-03-12T12:01:43Z

Content type: tutorial

Language: en

Sources: [Pony Foo](<https://devfeed.tech/sources/pony-foo.md>)

Topics: [GraphQL](<https://devfeed.tech/topics/graphql.md>), [API](<https://devfeed.tech/topics/api.md>), [CRUD](<https://devfeed.tech/topics/crud.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [apollo](<https://devfeed.tech/tags/apollo.md>), [code](<https://devfeed.tech/tags/code.md>), [crud](<https://devfeed.tech/tags/crud.md>), [graphql](<https://devfeed.tech/tags/graphql.md>), [rest](<https://devfeed.tech/tags/rest.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

## AI overview

An in-depth tutorial introducing GraphQL, explaining how it works, how it compares with REST, and how to use types, queries, mutations, and schemas to build a simple API.

## Source excerpt

GraphQL is all the rage, but what exactly is it? In this in-depth walkthrough, we take a look at what GraphQL is, how to use it, and why you should use it. Learn why GraphQL is all the rage! We'll walk through the implementation of a schema for a popcorn company's API, learning about types, queries, and mutations as we go. I love popcorn. As I'm writing this, I'm snacking on a bowl of multi-colored kernels, lightly seasoned with Flavacol (hint: this is the movie theater's secret) and I'm feeling a twinge of hubris in my eye... "I should start a popcorn company..." Well, that's a terrible idea, Ryan! But, for the sake of this tutorial, it's the best idea you've had all week. In this tutorial, we're going to learn how to create a simple, GraphQL-based API for a popcorn company. All we need is a name. Seeing as how I'm quite fond of sarcasm, how about... Sarcastic Kernels: The Popcorn You Love to Hate to Eat™ Perfect! And like any self-respecting nerd, it only seems right to start writing some code before we come up with a sound business plan. To get started, let's wrap our heads around what GraphQL is and how it compares to REST. What is GraphQL? GraphQL is a client-side query language coupled with a pattern -- formally known as a "schema" -- for organizing the creation, reading, updating, and deleting of data in your application (yeah, that CRUD). We say "application", here, and not database because GraphQL is data-source-agnostic, meaning it doesn't care where your data lives. From the outside looking in, GraphQL can seem quite scary. Does the "Graph" part mean I have to learn about graph databases? Does the QL (query language) mean I have to learn I have to learn a brand new programming language?! Not quite. To calm your nerves, the harsh truth is: GraphQL is just a dressed up GET or POST request. Wait, what?! Yep. While GraphQL as a whole does introduce some new concepts for organizing and interacting with your data, behind the curtain, GraphQL still relies on a good ol'