Why is The Graph critical for Web3?
The new, better future — almost always you need fight for it. And if you think that the war for a new future will take place with the help of starships and blasters, you are wrong. This war is going already — on laptop screens.
The concept of Web3 has been questioned and criticized for a long time. Decentralized applications will never be widespread — was the dominant opinion. But there were persistent stubborn believers, continuing their work despite the tough times.
And we can witness the New Era is coming. The more and more developers and common users start to realize that Web 2.0 is the Internet of corporations and monopoly. Due to being overly centralized it is vulnerable, manipulative, and prone to manipulation. Reliable, secure, private dApps emerge every day; the decentralized internet, where third parties have less control over user interaction and value transfers began to form. But there is still a lot of work ahead and many problems await for solutions.
It’s obvious that the totally new Web 3.0 deserves a totally new data access protocol. Let me outline the problem. Globally the blockchains and databases are quite close in their concept, but querying databases feels like something really different compared to querying blockchains. Anyone who’s ever tried to build dApps on the Ethereum blockchain would admit: while some data is easily queryable from a blockchain like Ethereum, with the increase in the amount of data it becomes literally impossible, at least very time-consuming.
Data in blockchain is kept in a decentralized network of nodes and they constantly change and copy records among themselves. Comparing to centralized database , it is not so easy to access the data. Data in blockchain usually encrypted, so it takes efforts and time to interpret it. And finally, it is simply hard to navigate in blockchain because of its structure of sequential group of blocks.
There are technologies that solve some of these problems, but it is time to unite all the solutions of these large-scale queries together.
The Graph and its subgraphs provide the solution to the problem. The Graph is an indexing protocol for organizing and efficiently accessing data from blockchains and storage networks. As the Graph team mentioned they realize that the indexing and query layer is completely missing from the Web3 nowadays.
The Graph offers a way to index and query data stored on blockchain efficiently using GraphQL. GraphQL is a query language for APIs, invented and open sourced by Facebook company. Since then GraphQL has taken a life of its own, it’s gaining in popularity and being used to access databases. Because of this elegant language, the clients can request exactly what data they need and get back only the data that they’re requesting, nothing else. GraphQL is going to be the preferred query language and database of the decentralized Web3. A lot of companies have already switched to GraphQL (GitHub, Twitter, Yelp are among them).
The main idea behind The Graph is to solve the mentioned problem by building a decentralized protocol which will be enabled by Graph Nodes processing Ethereum events and storing them as indexed data which dApps can query through an API endpoint. The mission of The Graph is to enable internet applications that are entirely powered by public infrastructure.
Let’s illustrate how The Graph protocol actually works in simple words. dApps using their smart contracts create Ethereum transactions, which emit events. Graph Nodes scan Ethereum blocks looking for events and if they find events for your subgraph in Ethereum, they run the mapping function provided. This mapping decides how data gets stored and updated in Graph Nodes. A subgraph basically defines how to do this indexing work in a way that can eventually run on a decentralized network. The Graph provides a standardized way of indexing.
Developers (especially Curators, certainly) have already deployed a bunch of subgraphs for popular protocols and dApps. They can be browsed using the Graph Explorer. Finally, one can query data using a playground in Graph Explorer (it uses GraphQL syntax)
One of the most important challenges of Web 3.0 is successfully solved by The Graph team.
The Graph Foundation announced a successful public sale of GRT, The Graph’s native token, selling $12M to the community in October. And on December 17 The Graph Network finally launches its Mainnet, including deployment of The Graph Network contracts, deployment of GRT contract and distribution of GRT to stakeholders. Several exchanges listed the GRT token immediately.
Over 200 Indexers deployed nodes in the testnet and more than 1,600 individuals successfully completed the Curator Program to learn how to identify high-quality subgraphs. On the example of the Russian community of Indexers and Curators, want to notice how friendly was the atmosphere, it is a great pleasure to participate in such project.
The Graph will become one of the important protocols of the future Web3. So if you are building a scalable dApp you should take a closer look into The Graph protocol.