# Meet The Graph (From 0 to Hero) - Basic Level

By [Emmi ](https://paragraph.com/@emmilili) · 2024-05-10

---

Hello everyone! In this article, we will delve into a 0 to 100 explanation of what The Graph technology is all about. Additionally, we will understand what this technology offers for us and what it has for the future.

Get ready to discover the potential of The Graph and explore its fascinating use cases!

The Graph and the Data Revolution:
----------------------------------

To gain a clear understanding of the technology, I'll make room for a small glossary that will help us achieve a comprehensive experience.

**Glossary 📖 (Return to this section if you encounter an unfamiliar term)**

**Blockchain:** Decentralized and distributed database technology, recording all information like a ledger, with properties such as immutability (unable to be edited) and transparency.

**Decentralization:** A paradigm that distributes control, authority, and decision-making among multiple entities or participants instead of concentrating them in a single centralized entity. Removing the intermediary, in simple terms 😛

**Data Indexing:** Data indexing is like organizing a book. Think of an alphabetical index at the beginning of the book that helps you quickly find the information you need. In data indexing, a similar structure is created to store and access information efficiently.

**Token**: A digital asset representing some form of value, which can range from digital currencies to properties, songs, etc.

**NFTs (Non-Fungible Tokens):** Represent unique and irreplaceable items on the blockchain, such as artistic paintings, illustrative images, song lyrics, and much more.

**Smart Contracts:** Computer programs that automatically execute when certain pre-established conditions are met.

**GraphQL:** GraphQL is a query language and execution environment for APIs.

**YAML:** Data serialization formats that provide a mechanism for exchanging human-readable data.

**Manifesto:** A declaration of principles or values that guide the actions of a company or community.

The 'Google' of blockchains 🔍
------------------------------

The Graph is like a 'Google' for blockchains, as it indexes blockchain data so that developers can easily find it when building their applications.

Indexing data means _organizing it_, which is quite complex due to the following reasons:

![Example of blockchain](https://storage.googleapis.com/papyrus_images/bb1abeeaa494c911c8c84a817b8c16dd7221fbaac85c5fe1863582540df160cb.png)

Example of blockchain

This information is distributed across many blocks. Imagine a physical book where we jot down historical information of all the transfers and transactions we've made in 1 year or 10 years. It can be very complex to search for something specific within this book.

![](https://storage.googleapis.com/papyrus_images/36d1cec3d79fed7bcc2b5d4e87cde4e9e1998f30682e9c8399869232646b04f8.png)

The information contained in the blocks can vary, from financial transaction data to ownership histories of assets.

The Graph: The Solution to This Problem
---------------------------------------

The Graph makes organizing the data we need from the blockchain easy, and it does all this through "Subgraphs and Substreams" (Stay tuned for an article on these two tools 🖥️)

### What the @#?'"\[\*! is a Subgraph?

It refers to a collection of indexed data representing a specific part or particular view of a blockchain.

A subgraph is essentially a predefined query that specifies which data should be gathered and how it should be structured to enable efficient searches and retrieval.

### **你还不明白吗？**

![](https://storage.googleapis.com/papyrus_images/fab70a179d22e8dc28bd9bda0bcd115f8e728cdd7883c29fba907dc3b852ad39.jpg)

Don't worry if what you're reading sounds like Chinese right now, we'll gradually delve into more details. But hey, **I'll give you an example instead!**

![](https://storage.googleapis.com/papyrus_images/b3f6ad457bd8932235902f85f67a8b27a5fa98882ce8e344cf9b9c39c5e0f1c8.png)

**Example 1:** We are developing an application that needs to identify the owners of a collection of NFTs, to award them a prize for being among the first 30 to acquire them. Obtaining and organizing this information is highly complex, but thanks to the use of subgraphs, we will be able to centralize all relevant data in a single repository.

Anatomy of a Subgraph (3-3-3-3)
-------------------------------

If you're wondering what the term "3-3-3-3" represents, it's my way of expressing that only three fundamental elements are required to use The Graph. I assure you that you'll soon understand its meaning in its entirety.

This concept may initially seem complicated to those unfamiliar with software development, but you don't need to worry; we'll tackle each aspect gradually and comprehensibly.

It's important to know that a subgraph processes and stores data so that it can be easily queried using a query language called GraphQL.

**3 Essential Parts**

1.  `subgraph.yaml`: A [YAML](https://www.redhat.com/en/topics/automation/what-is-yaml) file containing the manifest of the subgraph.
    
2.  `schema.graphql`: A [GraphQL](https://graphql.org/) schema that defines what data is stored for your subgraph and how to query it through GraphQL.
    
3.  `AssemblyScript Mappings`: [AssemblyScript](https://www.assemblyscript.org/) code that translates from event data to the entities defined in your schema.
    

**3 Basic Elements You Need to Start Using or Creating Subgraphs:**

1.  The address of a **smart contract** from a network of your choice.
    
2.  Tokens of this technology are called _GRT_, and if you're just testing and learning, you can use testnet tokens (used for testing purposes only).
    
3.  A **crypto wallet** (You can use any, but I recommend Metamask).
    

### The Graph supports over 40 networks!

![](https://storage.googleapis.com/papyrus_images/2e2518d4aee5c81354a5eb8d87a01fee6d3a91042f5fb7f6dbd10adc3663accd.png)

Last year, at this same time, The Graph didn't have support for multiple networks as it does now. This significant advancement is attributed to the inauguration of a new era, named "The dawn of decentralized data" or, in its English denomination, "Sunrise of decentralized data".

But let's not get ahead of ourselves, let's continue with the Anatomy of our subgraphs 🤫

**3 Ways to Index Data**

1.  Create your subgraphs.
    
2.  Use existing subgraphs ([Find them by clicking here](https://thegraph.com/explorer)).
    
3.  Create **substreams** (I'll leave this topic for another article so we don't get confused 😉).
    

**3 Basic Tools to Start:**

1.  Visual Studio, IntelliJ, or any code editor.
    
2.  Lots of patience 🧘🏽‍♀️ (Every learning process takes time, let's not get frustrated :D)
    
3.  Create an account on [Subgraph Studio](https://thegraph.com/studio/) (A visual way to create or use subgraphs).
    

![](https://storage.googleapis.com/papyrus_images/a7c576a0f5c2f2edfadb59330edd64a1c8125c3c51147aebfdcd873f824ae18d.png)

If you've made it this far, I appreciate it!! I did this with a lot of patience and in a veryyyyy simple way to make it understandable for you 🤠

Let's continue...

![](https://storage.googleapis.com/papyrus_images/df5db0056c12268b99bcf210127b0eb9dbf1b7192783e771c48b194696d6d166.jpg)

The roles within The Graph (also known as its functions)
--------------------------------------------------------

Let's get straight to the point; it consists of 4 different roles:

1.  **Developers:** They are the ones who use The Graph to query data in their applications, either by creating or using existing subgraphs.
    
2.  **Indexers:** They are responsible for operating a computer to index the data.
    
3.  **Curators:** As the name suggests, curators evaluate and signal which subgraphs will be indexed.
    
4.  **Delegators:** They are network participants who delegate tokens of this project (GRT) to one or more indexers. They contribute to the security of the network.
    

GRT, The Trust Token
--------------------

As a utility token, GRT plays several roles within The Graph ecosystem:

![GRT TOKEN](https://storage.googleapis.com/papyrus_images/d0b4335dd7e8ad6126a757c66daaf8c584d2a30b1333aaed6347c3caed726d26.jpg)

GRT TOKEN

**Staking and Validation:** All individuals holding GRT tokens can participate in The Graph's consensus, securing the network and validating transactions by staking (long-term deposit) their tokens. In return, validators receive rewards in the form of GRT tokens for their participation in the network.

**Fee Payment:** GRT is used to pay query fees on the network. Developers of dApps seeking access to indexed data through The Graph must pay a fee in GRT for each query made.

**Incentives for Curators:** They receive rewards in GRT for identifying high-quality subgraphs and keeping them updated.

**Delegation Rewards:** Those holding GRT tokens can also delegate their tokens to validators to participate in the consensus process and receive rewards proportional to the number of tokens they have delegated.

_That's great! It seems like we've covered a lot of ground. If you have more questions or if there's anything else I can assist you with, feel free to let me know!_

The final 10% of understanding The Graph.
-----------------------------------------

![Sunray: Phase of Sunrise of Decentralized Data](https://storage.googleapis.com/papyrus_images/8dab66f947ab1936576b7087a57370db6c20ad3798e845e438f3fae1f17a1b35.png)

Sunray: Phase of Sunrise of Decentralized Data

Part of understanding and supporting projects like this is based on them having a solid roadmap to improve the developer experience. That's why we find ourselves in the **_Sunrise of Decentralized Data._**

This is a plan or roadmap of all the good things to come and the advancements they plan to achieve.

It's divided into **3 phases: Sunray, Sunbeam, and Sunrise** ☀️, and we're currently entering the second phase.

![The Graph Roadmap](https://storage.googleapis.com/papyrus_images/93453b0b3c6c08e9274ade6f76c3db66953e18b3677743c2a546426da84806ad.png)

The Graph Roadmap

Thank you for reaching the end of the article, don't forget to subscribe! In the next article, I'll tell you all about the new roadmap that's coming.

**#GraphRising 🌟**

Don't forget that if you want more information about this, you can check the documentation at [https://thegraph.com](https://thegraph.com)

![](https://storage.googleapis.com/papyrus_images/d44ee9a18ebec853da622bd18f364eb581f837d9144bc49518a07ae8b0e2a975.png)

---

*Originally published on [Emmi ](https://paragraph.com/@emmilili/meet-the-graph-from-0-to-hero-basic-level)*
