{"id":3960,"date":"2026-10-13T08:52:47","date_gmt":"2026-10-13T08:52:47","guid":{"rendered":"https:\/\/nownodes.io\/blog\/?p=3960"},"modified":"2026-10-13T08:52:48","modified_gmt":"2026-10-13T08:52:48","slug":"how-to-build-and-deploy-a-subgraph-with-the-graph","status":"publish","type":"post","link":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/","title":{"rendered":"How to Build and Deploy a Subgraph With The Graph"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Reading data from a blockchain sounds simple until you try it. A smart contract emits events, but pulling those events back out in a useful order \u2014 filtered, aggregated, ready for a frontend \u2014 is slow and awkward if you talk to the chain directly. A subgraph fixes that by indexing the data ahead of time and serving it over a GraphQL API.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This guide walks through how to build and deploy a subgraph with The Graph, from scaffolding your first project to publishing it so other developers can query it. The flow changed meaningfully in recent years, so some older tutorials will send you down the wrong path. The hosted service that most early tutorials reference was retired on June 12, 2024, and <a href=\"https:\/\/thegraph.com\/blog\/20billion-queries\/\" rel=\"nofollow noopener noreferrer\">all queries now run through The Graph Network<\/a>. The current route is Subgraph Studio plus the Graph CLI, and that is what we cover here.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"what-is-a-subgraph\">What Is a Subgraph?<\/h2>\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"512\" src=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-85-1024x512.png\" alt=\"\" class=\"wp-image-3962\" srcset=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-85-1024x512.png 1024w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-85-300x150.png 300w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-85-768x384.png 768w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-85-1536x768.png 1536w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-85.png 1774w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A subgraph is an open API that indexes data from a blockchain and makes it queryable with GraphQL. Instead of scanning the chain yourself every time you need information, you define the data you care about once, and The Graph keeps an up-to-date, structured copy of it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Think of the raw chain as an append-only log. Every block adds more entries, and finding the ten most recent transfers for one address means reading through a lot of noise. A subgraph listens for the specific events you name, transforms them into clean records, and stores them so a single GraphQL request returns exactly what you asked for.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">GraphQL is the query language that sits on top. It lets a client request named fields and relationships in one call, rather than stitching together several lower-level requests. The Graph is the indexing protocol that runs the whole thing, and it has served <a href=\"https:\/\/thegraph.com\/blog\/20billion-queries\/\" rel=\"nofollow noopener noreferrer\">more than 1.27 trillion queries to over 75,000 projects across 60+ networks<\/a> as of early 2026.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"what-are-the-parts-of-a-subgraph\">What Are the Parts of a Subgraph?<\/h3>\n\n\n<p class=\"wp-block-paragraph\">Every subgraph is built from three files, and most of your work happens in them:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>The manifest (<code>subgraph.yaml<\/code>)<\/strong> \u2014 defines the data sources: which contract to watch, on which network, from which start block, and which events to handle.<\/li>\n\n\n\n<li><strong>The schema (<code>schema.graphql<\/code>)<\/strong> \u2014 describes the entities you want to query and how they relate, written in GraphQL schema definition language.<\/li>\n\n\n\n<li><strong>The mappings (<code>src\/<\/code>)<\/strong> \u2014 AssemblyScript functions that take each event and turn it into the entities defined in your schema. AssemblyScript is a typed dialect close to TypeScript, so it reads familiar if you have written JavaScript.<\/li>\n<\/ul>\n\n\n<h2 class=\"wp-block-heading\" id=\"why-query-blockchain-data-through-a-subgraph\">Why Query Blockchain Data Through a Subgraph?<\/h2>\n\n\n<p class=\"wp-block-paragraph\">The core problem is that blockchains are built for writing and verifying, not for reading in bulk. Pulling historical data straight from an endpoint works for one or two lookups, but it falls apart once you need filtering, sorting, pagination, or data joined across many events.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A subgraph moves that heavy lifting off the critical path. The indexing runs continuously in the background, so by the time your app asks a question, the answer is already assembled. Queries come back in milliseconds instead of forcing the user to wait while you replay contract logs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There is a second reason that matters for anyone building something meant to last. Because a published subgraph lives on a decentralized network of independent operators, your app does not depend on a single server you have to keep alive. The data stays available even if any one indexer goes offline.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"who-uses-subgraphs\">Who Uses Subgraphs?<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Subgraphs show up anywhere an application needs organized on-chain data. DeFi dashboards use them to track pools, positions, and prices. NFT marketplaces index mints, sales, and ownership history. Wallets and portfolio trackers pull balances and transaction records, and analytics teams build reporting on top of the same queries.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The common thread is a read-heavy product. If your interface shows users what happened on-chain \u2014 and it needs to be fast and searchable \u2014 a subgraph is usually the cleanest way to get there.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"what-you-need-before-building-a-subgraph\">What You Need Before Building a Subgraph<\/h2>\n\n\n<p class=\"wp-block-paragraph\">A few prerequisites save time later. Have these ready before you start:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>A crypto wallet.<\/strong> You will use it to create and, later, publish your subgraph.<\/li>\n\n\n\n<li><strong>A deployed smart contract address<\/strong> on a supported network. If the contract is verified on a block explorer such as Etherscan, the CLI can fetch its ABI for you.<\/li>\n\n\n\n<li><strong>Node.js installed<\/strong>, since the Graph CLI runs on it.<\/li>\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">One point that trips people up is the start block. If you index a contract from its earliest activity, the indexer has to read historical state, which means it needs access to an archive endpoint for that network rather than a pruned one. When you self-host your own indexing setup (covered below), that endpoint is something you supply. A managed provider such as <a href=\"https:\/\/nownodes.io\/\">NOWNodes<\/a> offers <a href=\"https:\/\/nownodes.io\/nodes\">archive access across 120+ networks<\/a>, so you can point your indexer at historical data without running and syncing that infrastructure yourself.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"how-to-build-and-deploy-a-subgraph\">How to Build and Deploy a Subgraph<\/h2>\n\n\n<p class=\"wp-block-paragraph\">With the prerequisites in place, the full path from empty folder to a working endpoint takes six steps.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"create-the-subgraph-in-subgraph-studio\">Create the Subgraph in Subgraph Studio<\/h3>\n\n\n<p class=\"wp-block-paragraph\">Go to <a href=\"https:\/\/thegraph.com\/studio\/\">Subgraph Studio<\/a>, connect your wallet, and click <strong>Create a Subgraph<\/strong>. The docs suggest naming it as &#8220;Subgraph Name Chain Name&#8221; in title case, which keeps things readable once you have several. This step gives you a dashboard and, importantly, a deploy key you will need shortly.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"install-the-graph-cli\">Install the Graph CLI<\/h3>\n\n\n<p class=\"wp-block-paragraph\">Install the command-line tool globally with npm:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>npm install -g @graphprotocol\/graph-cli@latest<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The package is <code>@graphprotocol\/graph-cli<\/code>, and the release line sits in the 0.98.x series as of early 2026. If you prefer Yarn, <code>yarn global add @graphprotocol\/graph-cli<\/code> does the same job.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"initialize-the-project-with-graph-init\">Initialize the Project With graph init<\/h3>\n\n\n<p class=\"wp-block-paragraph\">From your terminal, run:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>graph init<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The command scaffolds a project by asking a short series of questions: the protocol, a slug, the output directory, the network, your contract address, the ABI, the start block, and the contract name. If your contract is verified on its block explorer, the ABI and start block are filled in automatically. If not, you pass the ABI as a JSON file. When it finishes, you have a complete project folder with the manifest, schema, and mapping files generated from your contract&#8217;s events.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"edit-the-manifest-schema-and-mappings\">Edit the Manifest, Schema, and Mappings<\/h3>\n\n\n<p class=\"wp-block-paragraph\">This is where the subgraph becomes yours. Open <code>subgraph.yaml<\/code> and confirm the data source, events, and start block are correct. Then shape <code>schema.graphql<\/code> to describe the entities you actually want to query \u2014 a <code>Transfer<\/code> entity with sender, recipient, amount, and timestamp, for example.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Finally, write the logic in your mapping file. Each handler receives an event and creates or updates entities. A transfer handler might read the event parameters, build a new <code>Transfer<\/code> record, and save it. Keep handlers focused: one event in, clean entities out.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"generate-types-build-and-deploy\">Generate Types, Build, and Deploy<\/h3>\n\n\n<p class=\"wp-block-paragraph\">Generate AssemblyScript types from your schema and ABI, then compile the subgraph to WebAssembly:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>graph codegen &amp;&amp; graph build<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Authenticate with the deploy key from your Studio dashboard, then deploy:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>graph auth &lt;DEPLOY_KEY&gt;\ngraph deploy &lt;SUBGRAPH_SLUG&gt;<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Run <code>graph auth<\/code> and <code>graph deploy<\/code> as two separate commands. The CLI asks for a version label on deploy, and semantic versioning like <code>0.0.1<\/code> is the recommended convention.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"test-in-subgraph-studio\">Test in Subgraph Studio<\/h3>\n\n\n<p class=\"wp-block-paragraph\">Deploying sends the subgraph to Studio, where it starts indexing on a single Edge &amp; Node\u2013operated Upgrade Indexer. Watch the dashboard until it syncs, then run sample queries in the built-in playground and check the logs for mapping errors. A deployed subgraph here is free and rate-limited, and it stays private \u2014 it is a staging environment, not a public release.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"deploying-vs-publishing-whats-the-difference\">Deploying vs. Publishing: What&#8217;s the Difference?<\/h2>\n\n\n<p class=\"wp-block-paragraph\">This distinction confuses almost everyone the first time, and getting it wrong means your subgraph either stays hidden or costs you unexpected gas. Deploying is for testing. Publishing is an on-chain action that makes your subgraph a public, production resource on The Graph Network.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"683\" src=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-86-1024x683.png\" alt=\"\" class=\"wp-image-3963\" srcset=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-86-1024x683.png 1024w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-86-300x200.png 300w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-86-768x512.png 768w, https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/image-86.png 1536w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th><\/th><th>Deploy (Subgraph Studio)<\/th><th>Publish (The Graph Network)<\/th><\/tr><\/thead><tbody><tr><td>Action type<\/td><td>Off-chain, CLI only<\/td><td>On-chain transaction<\/td><\/tr><tr><td>Visibility<\/td><td>Private<\/td><td>Public in Graph Explorer<\/td><\/tr><tr><td>Who indexes it<\/td><td>One Upgrade Indexer<\/td><td>Decentralized indexers<\/td><\/tr><tr><td>Rate limits<\/td><td>Yes<\/td><td>None<\/td><\/tr><tr><td>Cost<\/td><td>Free<\/td><td>Gas, plus optional curation<\/td><\/tr><tr><td>Best for<\/td><td>Development and staging<\/td><td>Live applications<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When the subgraph is ready, you publish it. From Studio, click <strong>Publish<\/strong> and pick a network. From the CLI \u2014 <a href=\"https:\/\/thegraph.com\/docs\/en\/subgraphs\/quick-start\/\" rel=\"nofollow noopener noreferrer\">version 0.73.0 and later<\/a> \u2014 you can run the build again and then publish:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">bash<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>graph codegen &amp;&amp; graph build\ngraph publish<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A window opens to connect your wallet, add metadata, and complete the on-chain deployment. To attract indexers to pick up your subgraph, the docs recommend curating at least 3,000 GRT, which is enough to draw roughly 3 indexers, and you can do that in the same transaction as publishing to save gas. Once live, your subgraph is queryable by anyone, with the first 100,000 queries per month free on The Graph Network.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"can-you-run-a-subgraph-locally\">Can You Run a Subgraph Locally?<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Yes, and many teams do before touching Studio. The indexing software, Graph Node, is open source, so you can run the whole stack on your own machine \u2014 a local Graph Node instance, an IPFS node for subgraph files, and a Postgres database for the indexed data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The piece Graph Node always needs is a connection to the chain it indexes. You point it at an endpoint for your target network, and it reads blocks and events from there. If you would rather not run and sync that infrastructure yourself, you can connect Graph Node to a hosted endpoint from a provider like NOWNodes and keep your attention on the subgraph logic. Local setups give you fast iteration and full control; the trade-off is that you are now responsible for keeping those services running.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"final-thoughts\">Final Thoughts<\/h2>\n\n\n<p class=\"wp-block-paragraph\">Building a subgraph comes down to three ideas: tell The Graph which contract and events to watch, shape the data into entities you want to query, and choose between a private deploy for testing and a public publish for production. The commands are short, and most of your real effort goes into the schema and mappings.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Start in Subgraph Studio, get a subgraph indexing and returning clean queries, and only publish to the network once it behaves the way your app needs. From there, GraphQL does the rest \u2014 your frontend asks for exactly the fields it wants, and the data is already waiting.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"faq\">FAQ<\/h2>\n\n<h3 class=\"wp-block-heading\" id=\"how-much-does-it-cost-to-query-a-subgraph-on-the-graph-network\">How Much Does It Cost to Query a Subgraph on The Graph Network?<\/h3>\n\n\n<p class=\"wp-block-paragraph\">Each account gets 100,000 free queries per month on The Graph Network. Beyond that, querying is usage-based and paid in advance, so you are billed for the volume your application actually sends rather than a fixed subscription.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"how-long-does-a-subgraph-take-to-index\">How Long Does a Subgraph Take to Index?<\/h3>\n\n\n<p class=\"wp-block-paragraph\">It depends on your start block, how active the contract is, and the network. A subgraph that indexes from a recent block and watches a quiet contract can sync in minutes, while one replaying years of history on a busy chain can take hours or longer. Setting a later start block is the simplest way to speed up initial syncing when you do not need the full history.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"can-i-edit-a-subgraph-after-publishing-it\">Can I Edit a Subgraph After Publishing It?<\/h3>\n\n\n<p class=\"wp-block-paragraph\">Yes. You deploy a new version to Subgraph Studio, test it, and then publish that version to the network. Using semantic version labels keeps your releases organized, and consumers can point their queries at the updated version once it is live.<\/p>\n\n\n<h3 class=\"wp-block-heading\" id=\"do-i-need-grt-to-deploy-a-subgraph\">Do I Need GRT to Deploy a Subgraph?<\/h3>\n\n\n<p class=\"wp-block-paragraph\">No. Deploying to Subgraph Studio for testing is free and requires no GRT. The token only comes into play when you publish to the decentralized network, where curation signal in GRT helps attract indexers to serve your subgraph.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Reading data from a blockchain sounds simple until you try it. A smart contract emits events, but pulling those events back out in a useful order \u2014 filtered, aggregated, ready for a frontend \u2014 is slow and awkward if you talk to the chain directly. A subgraph fixes that by indexing the data ahead of [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":3961,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_eb_attr":"","_lmt_disableupdate":"","_lmt_disable":"","_monsterinsights_skip_tracking":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3960","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"blocksy_meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Deploy a Subgraph on The Graph: 2026 Step-by-Step Guide<\/title>\n<meta name=\"description\" content=\"Learn to build and deploy a subgraph with The Graph in 2026 \u2014 from Subgraph Studio and the Graph CLI to publishing on the decentralized network.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Deploy a Subgraph on The Graph: 2026 Step-by-Step Guide\" \/>\n<meta property=\"og:description\" content=\"Learn to build and deploy a subgraph with The Graph in 2026 \u2014 from Subgraph Studio and the Graph CLI to publishing on the decentralized network.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/\" \/>\n<meta property=\"og:site_name\" content=\"NOWNodes Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-13T08:52:47+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-10-13T08:52:48+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/nodes_1-98.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"2400\" \/>\n\t<meta property=\"og:image:height\" content=\"1200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u0410nastasia\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@nownodes\" \/>\n<meta name=\"twitter:site\" content=\"@nownodes\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"\u0410nastasia\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/\"},\"author\":{\"name\":\"\u0410nastasia\",\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/person\/0890ec68e813adecb93c18ee00e1e7a8\"},\"headline\":\"How to Build and Deploy a Subgraph With The Graph\",\"datePublished\":\"2026-10-13T08:52:47+00:00\",\"dateModified\":\"2026-10-13T08:52:48+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/\"},\"wordCount\":1889,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/nownodes.io\/blog\/#organization\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/\",\"url\":\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/\",\"name\":\"Deploy a Subgraph on The Graph: 2026 Step-by-Step Guide\",\"isPartOf\":{\"@id\":\"https:\/\/nownodes.io\/blog\/#website\"},\"datePublished\":\"2026-10-13T08:52:47+00:00\",\"dateModified\":\"2026-10-13T08:52:48+00:00\",\"description\":\"Learn to build and deploy a subgraph with The Graph in 2026 \u2014 from Subgraph Studio and the Graph CLI to publishing on the decentralized network.\",\"breadcrumb\":{\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\/\/nownodes.io\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Uncategorized\",\"item\":\"https:\/\/nownodes.io\/blog\/category\/uncategorized\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Build and Deploy a Subgraph With The Graph\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/nownodes.io\/blog\/#website\",\"url\":\"https:\/\/nownodes.io\/blog\/\",\"name\":\"NOWNodes Blog\",\"description\":\"Your first-to-go source of development guides, web3 analytics and most recent news about NOWNodes\",\"publisher\":{\"@id\":\"https:\/\/nownodes.io\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/nownodes.io\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/nownodes.io\/blog\/#organization\",\"name\":\"NOWNodes Blog\",\"url\":\"https:\/\/nownodes.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2024\/02\/cropped-New-Logo-NN.png\",\"contentUrl\":\"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2024\/02\/cropped-New-Logo-NN.png\",\"width\":1164,\"height\":1164,\"caption\":\"NOWNodes Blog\"},\"image\":{\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/twitter.com\/nownodes\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/person\/0890ec68e813adecb93c18ee00e1e7a8\",\"name\":\"\u0410nastasia\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/nownodes.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/1de24ab8dcdd7ec30f6adaf78b56bc1eda421f87575b7e103c8fc3fc4420e833?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/1de24ab8dcdd7ec30f6adaf78b56bc1eda421f87575b7e103c8fc3fc4420e833?s=96&d=mm&r=g\",\"caption\":\"\u0410nastasia\"},\"url\":\"https:\/\/nownodes.io\/blog\/author\/nasty-nownodes\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Deploy a Subgraph on The Graph: 2026 Step-by-Step Guide","description":"Learn to build and deploy a subgraph with The Graph in 2026 \u2014 from Subgraph Studio and the Graph CLI to publishing on the decentralized network.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/","og_locale":"en_US","og_type":"article","og_title":"Deploy a Subgraph on The Graph: 2026 Step-by-Step Guide","og_description":"Learn to build and deploy a subgraph with The Graph in 2026 \u2014 from Subgraph Studio and the Graph CLI to publishing on the decentralized network.","og_url":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/","og_site_name":"NOWNodes Blog","article_published_time":"2026-10-13T08:52:47+00:00","article_modified_time":"2026-10-13T08:52:48+00:00","og_image":[{"width":2400,"height":1200,"url":"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2026\/10\/nodes_1-98.jpg","type":"image\/jpeg"}],"author":"\u0410nastasia","twitter_card":"summary_large_image","twitter_creator":"@nownodes","twitter_site":"@nownodes","twitter_misc":{"Written by":"\u0410nastasia","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/#article","isPartOf":{"@id":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/"},"author":{"name":"\u0410nastasia","@id":"https:\/\/nownodes.io\/blog\/#\/schema\/person\/0890ec68e813adecb93c18ee00e1e7a8"},"headline":"How to Build and Deploy a Subgraph With The Graph","datePublished":"2026-10-13T08:52:47+00:00","dateModified":"2026-10-13T08:52:48+00:00","mainEntityOfPage":{"@id":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/"},"wordCount":1889,"commentCount":0,"publisher":{"@id":"https:\/\/nownodes.io\/blog\/#organization"},"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/","url":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/","name":"Deploy a Subgraph on The Graph: 2026 Step-by-Step Guide","isPartOf":{"@id":"https:\/\/nownodes.io\/blog\/#website"},"datePublished":"2026-10-13T08:52:47+00:00","dateModified":"2026-10-13T08:52:48+00:00","description":"Learn to build and deploy a subgraph with The Graph in 2026 \u2014 from Subgraph Studio and the Graph CLI to publishing on the decentralized network.","breadcrumb":{"@id":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/nownodes.io\/blog\/how-to-build-and-deploy-a-subgraph-with-the-graph\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/nownodes.io\/blog"},{"@type":"ListItem","position":2,"name":"Uncategorized","item":"https:\/\/nownodes.io\/blog\/category\/uncategorized"},{"@type":"ListItem","position":3,"name":"How to Build and Deploy a Subgraph With The Graph"}]},{"@type":"WebSite","@id":"https:\/\/nownodes.io\/blog\/#website","url":"https:\/\/nownodes.io\/blog\/","name":"NOWNodes Blog","description":"Your first-to-go source of development guides, web3 analytics and most recent news about NOWNodes","publisher":{"@id":"https:\/\/nownodes.io\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/nownodes.io\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/nownodes.io\/blog\/#organization","name":"NOWNodes Blog","url":"https:\/\/nownodes.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nownodes.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2024\/02\/cropped-New-Logo-NN.png","contentUrl":"https:\/\/nownodes.io\/blog\/wp-content\/uploads\/2024\/02\/cropped-New-Logo-NN.png","width":1164,"height":1164,"caption":"NOWNodes Blog"},"image":{"@id":"https:\/\/nownodes.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/twitter.com\/nownodes"]},{"@type":"Person","@id":"https:\/\/nownodes.io\/blog\/#\/schema\/person\/0890ec68e813adecb93c18ee00e1e7a8","name":"\u0410nastasia","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/nownodes.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/1de24ab8dcdd7ec30f6adaf78b56bc1eda421f87575b7e103c8fc3fc4420e833?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/1de24ab8dcdd7ec30f6adaf78b56bc1eda421f87575b7e103c8fc3fc4420e833?s=96&d=mm&r=g","caption":"\u0410nastasia"},"url":"https:\/\/nownodes.io\/blog\/author\/nasty-nownodes"}]}},"modified_by":"\u0410nastasia","_links":{"self":[{"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/posts\/3960","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/comments?post=3960"}],"version-history":[{"count":1,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/posts\/3960\/revisions"}],"predecessor-version":[{"id":3964,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/posts\/3960\/revisions\/3964"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/media\/3961"}],"wp:attachment":[{"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/media?parent=3960"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/categories?post=3960"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nownodes.io\/blog\/wp-json\/wp\/v2\/tags?post=3960"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}