Skip to main content

How do I deploy a subgraph to The Graph?

Deploying a subgraph to The Graph is a relatively straightforward process.

First, you will need to create a subgraph manifest file, which is a JSON file that contains information about your subgraph such as its name, description, and the data sources it will be querying. Once you have created the manifest file, you can deploy your subgraph to The Graph by using the Graph CLI (Command Line Interface). This tool allows you to easily deploy your subgraph to The Graph network.

To deploy your subgraph with the Graph CLI, first make sure that you have installed the latest version of the Graph CLI on your computer. Then open up a terminal window and navigate to the directory where your manifest file is located. Once in this directory, run the command “graph create” followed by the name of your manifest file.

This will initiate the deployment process and will take some time depending on how large your subgraph is. Once deployed, you can view and manage your subgraph from The Graph’s dashboard. Here you can view statistics about your subgraph such as its uptime and query performance.

You can also update or delete your subgraph from here if needed.

AI created text. No guarantee for the correctness of the content.

Other interesting questions on the topic of The Graph