From bade84ba5d0db80ec69e9f4fb7b98a5e0f308c61 Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Fri, 16 Aug 2024 17:35:39 -0700 Subject: [PATCH 1/7] Edits --- website/pages/en/network/developing.mdx | 120 +++++++++++++++++++----- 1 file changed, 95 insertions(+), 25 deletions(-) diff --git a/website/pages/en/network/developing.mdx b/website/pages/en/network/developing.mdx index 4a57b18f2a16..eda5dd70a5f8 100644 --- a/website/pages/en/network/developing.mdx +++ b/website/pages/en/network/developing.mdx @@ -2,52 +2,122 @@ title: Developing --- -Developers are the demand side of The Graph ecosystem. Developers build subgraphs and publish them to The Graph Network. Then, they query live subgraphs with GraphQL in order to power their applications. +Learn developer fundamentals and review the basics of a subgraph’s lifecycle. To start coding right away and engage The Graph, go to the following: [Developer Quick Start](/quick-start/) -## Subgraph Lifecycle +## Overview -Subgraphs deployed to the network have a defined lifecycle. +As a developer, you need important data to build and power your dapps. Querying and indexing that blockchain data can be challenging, but The Graph provides a solution to this issue. -### Build locally +On The Graph, you can: -As with all subgraph development, it starts with local development and testing. Developers can use the same local setup whether they are building for The Graph Network or a local Graph Node, leveraging `graph-cli` and `graph-ts` to build their subgraph. Developers are encouraged to use tools such as [Matchstick](https://github.com/LimeChain/matchstick) for unit testing to improve the robustness of their subgraphs. +1. Create, deploy and publish subgraphs to The Graph using **Graph CLI** and [Subgraph Studio](/https://thegraph.com/studio/). +2. Use Graph node via **GraphQL** to query live subgraphs and power dapps. -> There are certain constraints on The Graph Network, in terms of feature and network support. Only subgraphs on [supported networks](/developing/supported-networks) will earn indexing rewards, and subgraphs which fetch data from IPFS are also not eligible. +### What is GraphQL and Graph CLI? -### Deploy to Subgraph Studio +- **GraphCLI** is a command line interface tool for building and deploying to The Graph. +- **GraphQL** is the query language use for APIs and a runtime for executing those queries with your existing data. The Graph uses GraphQL to query subgraphs. -Once defined, the subgraph can be built and deployed to [Subgraph Studio](/deploying/subgraph-studio-faqs/). Subgraph Studio is a sandbox environment which will index the deployed subgraph and make it available for rate-limited development and testing. This gives developers an opportunity to verify that their subgraph does not encounter any indexing errors, and works as expected. +### Developer Capabilities -### Publish to the Network +- Engage with the entire subgraph lifecycle on the network, including publishing, querying and iterating on your custom subgraphs. +- Specialize in subgraph development, building open APIs for others to utilize and build on. +- Focus on application development by querying subgraphs deployed by other developers. -When the developer is happy with their subgraph, they can publish it to The Graph Network. This is an on-chain action, which registers the subgraph so that it is discoverable by Indexers. Published subgraphs have a corresponding NFT, which is then easily transferable. The published subgraph has associated metadata, which provides other network participants with useful context and information. +### Network Economics -### Signal to Encourage Indexing +As a developer, you can do any of the following: -Published subgraphs are unlikely to be picked up by Indexers without the addition of signal. Signal is locked GRT associated with a given subgraph, which indicates to Indexers that a given subgraph will receive query volume, and also contributes to the indexing rewards available for processing it. Subgraph developers will generally add signal to their subgraph, in order to encourage indexing. Third party Curators may also signal on a given subgraph, if they deem the subgraph likely to drive query volume. +- Lock up GRT to encourage indexing and the query subgraphs. +- Burn GRT whenever a subgraph is updated. -### Querying & Application Development +## Subgraph Specifics -Once a subgraph has been processed by Indexers and is available for querying, developers can start to use the subgraph in their applications. Developers query subgraphs via a gateway, which forwards their queries to an Indexer who has processed the subgraph, paying query fees in GRT. +### What are subgraphs? -In order to make queries, developers must generate an API key, which can be done in Subgraph Studio. This API key must be funded with GRT, in order to pay query fees. Developers can set a maximum query fee, in order to control their costs, and limit their API key to a given subgraph or origin domain. Subgraph Studio provides developers with data on their API key usage over time. +A subgraph is a custom API built on blockchain data. It extracts data from a blockchain, process it, and stores it so that it can be easily queried via GraphQL. -Developers are also able to express an Indexer preference to the gateway, for example preferring Indexers whose query response is faster, or whose data is most up to date. These controls are set in Subgraph Studio. +A subgraph primarily consists of the following files: -### Updating Subgraphs +- `subgraph.yaml`: this YAML file contains the subgraph manifest +- `subgraph.graphql`: this GraphQL schema defines what data is stored for your subgraph, and how to query it via GraphQL +- `AssemblyScript Mappings`: [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) code that translates from the event data to the entities defined in your schema -After a time a subgraph developer may want to update their subgraph, perhaps fixing a bug or adding new functionality. The subgraph developer may deploy new version(s) of their subgraph to Subgraph Studio for rate-limited development and testing. +Learn the detailed specifics to [create a subgraph](/developing/creating-a-subgraph/). -Once the Subgraph Developer is ready to update, they can initiate a transaction to point their subgraph at the new version. Updating the subgraph migrates any signal to the new version (assuming the user who applied the signal selected "auto-migrate"), which also incurs a migration tax. This signal migration should prompt Indexers to start indexing the new version of the subgraph, so it should soon become available for querying. +### Subgraph Lifecycle -### Deprecating Subgraphs +Here is a general view of a subgraph’s cycle: -At some point a developer may decide that they no longer need a published subgraph. At that point they may deprecate the subgraph, which returns any signalled GRT to the Curators. +![Subgraph Lifecycle](/img/subgraph-lifecycle.png) -### Diverse Developer Roles +### Subgraph Development -Some developers will engage with the full subgraph lifecycle on the network, publishing, querying and iterating on their own subgraphs. Some may be focused on subgraph development, building open APIs which others can build on. Some may be application focused, querying subgraphs deployed by others. +Subgraph development starts with local development and staging. -### Developers and Network Economics +- You can use the same local setup whether you're building for The Graph Network or a local Graph Node. + - You can leverage `graph-cli` and `graph-ts` to build your subgraph. +- You are encouraged to use tools such as [Matchstick](https://github.com/LimeChain/matchstick) for unit testing to improve the robustness of your subgraphs. -Developers are a key economic actor in the network, locking up GRT in order to encourage indexing, and crucially querying subgraphs, which is the network's primary value exchange. Subgraph developers also burn GRT whenever a subgraph is updated. +> Only subgraphs on [supported networks](/developing/supported-networks/) will earn indexing rewards. Subgraphs that fetch data from IPFS are also **not** eligible. + +## Deploy to Subgraph Studio + +Once defined, a subgraph can be built and deployed to [Subgraph Studio](/deploying-a-subgraph-to-studio/). In Subgraph Studio, you can do the following: + +- Verify that your subgraph doesn't have any indexing errors and works as expected. +- Use its staging environment to index the deployed subgraph and make it available for review. + +Learn how to [deploy subgraphs](/deploying-a-subgraph-to-studio/). + +## Publish to the Network + +When you are happy with your subgraph, you can publish it to The Graph Network. + +- This is an on-chain action, which registers the subgraph and makes it discoverable by Indexers. +- Published subgraphs have a corresponding NFT, which is then easily transferable. +- Published subgraphs have associated metadata, which provides other network participants with useful context and information. + +Learn how to [publish a subgraph](/publishing/publishing-a-subgraph/). + +## Add Signal for Indexing + +Published subgraphs are unlikely to be picked up by Indexers without signal. To encourage indexing you should add signal to your subgraph. + +**What is signal?** + +- Signal is locked GRT associated with a given subgraph. It indicates to indexers that a given subgraph will receive query volume and it contributes to the indexing rewards available for processing it. +- Third party Curators may also signal on a given subgraph, if they deem the subgraph likely to drive query volume. + +Learn more about signaling and [curating](/network/curating/) on The Graph. + +## Querying & Application Development + +Once a subgraph has been processed by Indexers and is available for querying, you can start using your subgraph in your applications. + +- You query subgraphs via a gateway, which forwards your queries to an Indexer who has processed the subgraph (paying query fees in GRT). +- In order to make queries, you must generate an API key, which can be done in [Subgraph Studio](/https://thegraph.com/studio/). +- This API key must be funded with GRT to pay query fees. +- You can set a maximum query fee to control their costs and limit your API key to a given subgraph or origin domain. +- Subgraph Studio provides you with data on your API key usage over time. +- You can express an Indexer preference to the gateway, such as preferring Indexers with fast query response or have up-to-date data. These controls are set in Subgraph Studio. + +Learn more about [querying](/querying/querying-the-graph/). + +## Updating Subgraphs + +To update your subgraph with bug fixes or new functionalities, initiate a transaction to point it to the new version. You can deploy new versions of your subgraphs to [Subgraph Studio](/https://thegraph.com/studio/) for development and testing. + +- If you selected "auto-migrate" when you applied the signal, updating the subgraph will migrate any signal to the new version and incur a migration tax. +- This signal migration should prompt Indexers to start indexing the new version of the subgraph, so it should soon become available for querying. + +## Deprecating Subgraphs + +If you no longer need a published subgraph, then you will need to deprecate the subgraph. + +- Deprecating a subgraph returns any signaled GRT to Curators. +- To deprecate a subgraph, see the [deprecating a subgraph guide](/network/developing/deprecating-a-subgraph/). + +## Transferring Subgraph + +You can transfer the ownership of a subgraph. To transfer subgraph ownership, see the [transfer subgraph guide](/transferring-subgraph-ownership/). From 2d67c865cdaa240899be2636522ab258657d03e5 Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Mon, 19 Aug 2024 08:48:58 -0700 Subject: [PATCH 2/7] moved section --- website/pages/en/network/developing.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/website/pages/en/network/developing.mdx b/website/pages/en/network/developing.mdx index eda5dd70a5f8..9f43c6d7ee7b 100644 --- a/website/pages/en/network/developing.mdx +++ b/website/pages/en/network/developing.mdx @@ -24,13 +24,6 @@ On The Graph, you can: - Specialize in subgraph development, building open APIs for others to utilize and build on. - Focus on application development by querying subgraphs deployed by other developers. -### Network Economics - -As a developer, you can do any of the following: - -- Lock up GRT to encourage indexing and the query subgraphs. -- Burn GRT whenever a subgraph is updated. - ## Subgraph Specifics ### What are subgraphs? @@ -121,3 +114,10 @@ If you no longer need a published subgraph, then you will need to deprecate the ## Transferring Subgraph You can transfer the ownership of a subgraph. To transfer subgraph ownership, see the [transfer subgraph guide](/transferring-subgraph-ownership/). + +### Network Economics + +As a developer, you can do any of the following: + +- Lock up GRT to encourage indexing and the query subgraphs. +- Burn GRT whenever a subgraph is updated. From 625e89fc358cb68b792829eaf573a91ed6a60178 Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Tue, 20 Aug 2024 11:09:53 -0700 Subject: [PATCH 3/7] updating edits --- website/pages/en/network/developing.mdx | 86 ++++++++++--------------- 1 file changed, 34 insertions(+), 52 deletions(-) diff --git a/website/pages/en/network/developing.mdx b/website/pages/en/network/developing.mdx index 9f43c6d7ee7b..b86b973f140c 100644 --- a/website/pages/en/network/developing.mdx +++ b/website/pages/en/network/developing.mdx @@ -2,7 +2,7 @@ title: Developing --- -Learn developer fundamentals and review the basics of a subgraph’s lifecycle. To start coding right away and engage The Graph, go to the following: [Developer Quick Start](/quick-start/) +Learn developer fundamentals and review the basics of a subgraph’s lifecycle. To start coding right away and build on The Graph, go to [Developer Quick Start](/quick-start/) ## Overview @@ -10,31 +10,30 @@ As a developer, you need important data to build and power your dapps. Querying On The Graph, you can: -1. Create, deploy and publish subgraphs to The Graph using **Graph CLI** and [Subgraph Studio](/https://thegraph.com/studio/). -2. Use Graph node via **GraphQL** to query live subgraphs and power dapps. +1. Create, deploy and publish subgraphs to The Graph using **Graph CLI** and [Subgraph Studio](https://thegraph.com/studio/). +2. Use GraphQL to query live subgraphs and power dapps. -### What is GraphQL and Graph CLI? +### What is GraphQL? -- **GraphCLI** is a command line interface tool for building and deploying to The Graph. -- **GraphQL** is the query language use for APIs and a runtime for executing those queries with your existing data. The Graph uses GraphQL to query subgraphs. +- [GraphQL](/querying/graphql-api/)is the query language for APIs and a runtime for executing those queries with your existing data. The Graph uses GraphQL to query subgraphs. ### Developer Capabilities -- Engage with the entire subgraph lifecycle on the network, including publishing, querying and iterating on your custom subgraphs. -- Specialize in subgraph development, building open APIs for others to utilize and build on. -- Focus on application development by querying subgraphs deployed by other developers. +- Query subgraphs built by other developers in [The Graph Network](https://thegraph.com/explorer) and integrate them into your own dapps. +- Create custom subgraphs to fulfill specific data needs, allowing improved scalability and flexibility for other developers. +- Deploy, publish, and signal your subgraphs within The Graph Network. ## Subgraph Specifics ### What are subgraphs? -A subgraph is a custom API built on blockchain data. It extracts data from a blockchain, process it, and stores it so that it can be easily queried via GraphQL. +A subgraph is a custom API built on blockchain data. It extracts data from a blockchain, processes it, and stores it so that it can be easily queried via GraphQL. A subgraph primarily consists of the following files: -- `subgraph.yaml`: this YAML file contains the subgraph manifest -- `subgraph.graphql`: this GraphQL schema defines what data is stored for your subgraph, and how to query it via GraphQL -- `AssemblyScript Mappings`: [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) code that translates from the event data to the entities defined in your schema +- `subgraph.yaml`: this YAML file contains the [subgraph manifest](/developing/creating-a-subgraph/#the-subgraph-manifest) +- `subgraph.graphql`: this GraphQL schema defines what data is stored for your subgraph, and how to query it via [GraphQL](/developing/creating-a-subgraph/#the-graphql-schema) +- `AssemblyScript Mappings`: [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) mappings translates data from the event data to the entities defined in your schema Learn the detailed specifics to [create a subgraph](/developing/creating-a-subgraph/). @@ -44,80 +43,63 @@ Here is a general view of a subgraph’s cycle: ![Subgraph Lifecycle](/img/subgraph-lifecycle.png) -### Subgraph Development +### Context for Subgraph Development -Subgraph development starts with local development and staging. +Great subgraphs start with a local development environment and unit tests. Developers can use `graph-cli,` `graph-ts,` and [Matchstick](/developing/unit-testing-framework/) to build robust subgraphs that deploy to The Graph Network. -- You can use the same local setup whether you're building for The Graph Network or a local Graph Node. - - You can leverage `graph-cli` and `graph-ts` to build your subgraph. -- You are encouraged to use tools such as [Matchstick](https://github.com/LimeChain/matchstick) for unit testing to improve the robustness of your subgraphs. - -> Only subgraphs on [supported networks](/developing/supported-networks/) will earn indexing rewards. Subgraphs that fetch data from IPFS are also **not** eligible. +> Developers use [Graph CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli), a command line interface tool for building and deploying subgraphs in The Graph. ## Deploy to Subgraph Studio -Once defined, a subgraph can be built and deployed to [Subgraph Studio](/deploying-a-subgraph-to-studio/). In Subgraph Studio, you can do the following: +Once defined, a subgraph can be deployed to [Subgraph Studio](/deploying/deploying-a-subgraph-to-studio/). In Subgraph Studio, you can do the following: -- Verify that your subgraph doesn't have any indexing errors and works as expected. - Use its staging environment to index the deployed subgraph and make it available for review. - -Learn how to [deploy subgraphs](/deploying-a-subgraph-to-studio/). +- Verify that your subgraph doesn't have any indexing errors and works as expected. ## Publish to the Network -When you are happy with your subgraph, you can publish it to The Graph Network. +When you are happy with your subgraph, you can [publish it](/publishing/publishing-a-subgraph/) to The Graph Network. -- This is an on-chain action, which registers the subgraph and makes it discoverable by Indexers. +- To put your subgraph into production and ensure indexers can index it, you must publish it to The Graph Network. + - This is an on-chain action, which registers the subgraph and makes it discoverable by Indexers. - Published subgraphs have a corresponding NFT, which is then easily transferable. - Published subgraphs have associated metadata, which provides other network participants with useful context and information. -Learn how to [publish a subgraph](/publishing/publishing-a-subgraph/). - ## Add Signal for Indexing -Published subgraphs are unlikely to be picked up by Indexers without signal. To encourage indexing you should add signal to your subgraph. +Published subgraphs are unlikely to be picked up by Indexers without signal. To encourage indexing you should add signal to your subgraph. Learn more about signaling and [curating](/network/curating/) on The Graph. -**What is signal?** +### What is signal? - Signal is locked GRT associated with a given subgraph. It indicates to indexers that a given subgraph will receive query volume and it contributes to the indexing rewards available for processing it. - Third party Curators may also signal on a given subgraph, if they deem the subgraph likely to drive query volume. -Learn more about signaling and [curating](/network/curating/) on The Graph. - ## Querying & Application Development -Once a subgraph has been processed by Indexers and is available for querying, you can start using your subgraph in your applications. - -- You query subgraphs via a gateway, which forwards your queries to an Indexer who has processed the subgraph (paying query fees in GRT). -- In order to make queries, you must generate an API key, which can be done in [Subgraph Studio](/https://thegraph.com/studio/). -- This API key must be funded with GRT to pay query fees. -- You can set a maximum query fee to control their costs and limit your API key to a given subgraph or origin domain. -- Subgraph Studio provides you with data on your API key usage over time. -- You can express an Indexer preference to the gateway, such as preferring Indexers with fast query response or have up-to-date data. These controls are set in Subgraph Studio. +Once a subgraph has been processed by Indexers and is ready to [query](/querying/querying-the-graph/), developers can start using their subgraph in their dapps. -Learn more about [querying](/querying/querying-the-graph/). +- When a query is made, The Graph Network selects an Indexer who has processed the subgraph to serve that query. Query fees are paid in GRT. +- Developers must generate an API key and fund it with GRT to make queries, which can be done in [Subgraph Studio](https://thegraph.com/studio/). +- Developers can set a maximum query fee, in order to control their costs, and limit their API key to a given subgraph or origin domain. + - Subgraph Studio provides API key usage data. +- Developers can express an Indexer preference to the gateway, for example preferring Indexers whose query response is faster, or whose data is most up to date. These controls are set in Subgraph Studio. ## Updating Subgraphs -To update your subgraph with bug fixes or new functionalities, initiate a transaction to point it to the new version. You can deploy new versions of your subgraphs to [Subgraph Studio](/https://thegraph.com/studio/) for development and testing. +To update your subgraph with bug fixes or new functionalities, initiate a transaction to point it to the new version. You can deploy new versions of your subgraphs to [Subgraph Studio](https://thegraph.com/studio/) for development and testing. - If you selected "auto-migrate" when you applied the signal, updating the subgraph will migrate any signal to the new version and incur a migration tax. - This signal migration should prompt Indexers to start indexing the new version of the subgraph, so it should soon become available for querying. -## Deprecating Subgraphs - -If you no longer need a published subgraph, then you will need to deprecate the subgraph. - -- Deprecating a subgraph returns any signaled GRT to Curators. -- To deprecate a subgraph, see the [deprecating a subgraph guide](/network/developing/deprecating-a-subgraph/). +## Deprecating & Transferring Subgraphs -## Transferring Subgraph +If you no longer need a published subgraph, you can deprecate or transfer a subgraph. Deprecating a subgraph returns any signaled GRT to [Curators](/network/curating/). -You can transfer the ownership of a subgraph. To transfer subgraph ownership, see the [transfer subgraph guide](/transferring-subgraph-ownership/). +- To deprecate or transfer a subgraph, check out [this guide](/managing/transfer-and-deprecate-a-subgraph/#deprecating-a-subgraph). -### Network Economics +## Network Economics As a developer, you can do any of the following: -- Lock up GRT to encourage indexing and the query subgraphs. +- Lock up GRT to encourage indexing and querying subgraphs. - Burn GRT whenever a subgraph is updated. From 51f76f7cec89fe44c9b19411203d4fb4eaa1eb2f Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Tue, 20 Aug 2024 15:53:10 -0700 Subject: [PATCH 4/7] updating --- website/pages/en/network/developing.mdx | 27 ++++++++++--------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/website/pages/en/network/developing.mdx b/website/pages/en/network/developing.mdx index b86b973f140c..890cdb8e3ba0 100644 --- a/website/pages/en/network/developing.mdx +++ b/website/pages/en/network/developing.mdx @@ -2,7 +2,7 @@ title: Developing --- -Learn developer fundamentals and review the basics of a subgraph’s lifecycle. To start coding right away and build on The Graph, go to [Developer Quick Start](/quick-start/) +Learn developer fundamentals and review the basics of a subgraph’s lifecycle. To start coding right away and build on The Graph, go to [Developer Quick Start](/quick-start/). ## Overview @@ -10,7 +10,7 @@ As a developer, you need important data to build and power your dapps. Querying On The Graph, you can: -1. Create, deploy and publish subgraphs to The Graph using **Graph CLI** and [Subgraph Studio](https://thegraph.com/studio/). +1. Create, deploy and publish subgraphs to The Graph using Graph CLI and [Subgraph Studio](https://thegraph.com/studio/). 2. Use GraphQL to query live subgraphs and power dapps. ### What is GraphQL? @@ -31,23 +31,21 @@ A subgraph is a custom API built on blockchain data. It extracts data from a blo A subgraph primarily consists of the following files: -- `subgraph.yaml`: this YAML file contains the [subgraph manifest](/developing/creating-a-subgraph/#the-subgraph-manifest) -- `subgraph.graphql`: this GraphQL schema defines what data is stored for your subgraph, and how to query it via [GraphQL](/developing/creating-a-subgraph/#the-graphql-schema) -- `AssemblyScript Mappings`: [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) mappings translates data from the event data to the entities defined in your schema +- `subgraph.yaml`: this YAML file contains the [subgraph manifest](/developing/creating-a-subgraph/#the-subgraph-manifest). +- `subgraph.graphql`: this GraphQL schema defines what data is stored for your subgraph, and how to query it via [GraphQL](/developing/creating-a-subgraph/#the-graphql-schema). +- `mappings`: this [AssemblyScript](https://github.com/AssemblyScript/assemblyscript) mappings file translates data from the event data to the entities defined in your schema. Learn the detailed specifics to [create a subgraph](/developing/creating-a-subgraph/). ### Subgraph Lifecycle -Here is a general view of a subgraph’s cycle: +Here is a general view of a subgraph’s lifecycle: ![Subgraph Lifecycle](/img/subgraph-lifecycle.png) ### Context for Subgraph Development -Great subgraphs start with a local development environment and unit tests. Developers can use `graph-cli,` `graph-ts,` and [Matchstick](/developing/unit-testing-framework/) to build robust subgraphs that deploy to The Graph Network. - -> Developers use [Graph CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli), a command line interface tool for building and deploying subgraphs in The Graph. +Great subgraphs start with a local development environment and unit tests. Developers use [Graph CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli), a command-line interface tool for building and deploying subgraphs in The Graph. They can also use [Graph TypeScript](/developing/graph-ts/) and [Matchstick](/developing/unit-testing-framework/) to create robust subgraphs that deploy to The Graph Network. ## Deploy to Subgraph Studio @@ -58,11 +56,10 @@ Once defined, a subgraph can be deployed to [Subgraph Studio](/deploying/deployi ## Publish to the Network -When you are happy with your subgraph, you can [publish it](/publishing/publishing-a-subgraph/) to The Graph Network. +When you are happy with your subgraph, you can put it into production and [publish it](/publishing/publishing-a-subgraph/) to The Graph Network. This ensures Indexers can index it. -- To put your subgraph into production and ensure indexers can index it, you must publish it to The Graph Network. - - This is an on-chain action, which registers the subgraph and makes it discoverable by Indexers. -- Published subgraphs have a corresponding NFT, which is then easily transferable. +- This is an on-chain action, which registers the subgraph and makes it discoverable by Indexers. +- Published subgraphs have a corresponding NFT, which defines the ownership of the subgraph. You can [transfer the subgraph's ownership](/managing/transfer-and-deprecate-a-subgraph) by sending the NFT. - Published subgraphs have associated metadata, which provides other network participants with useful context and information. ## Add Signal for Indexing @@ -93,9 +90,7 @@ To update your subgraph with bug fixes or new functionalities, initiate a transa ## Deprecating & Transferring Subgraphs -If you no longer need a published subgraph, you can deprecate or transfer a subgraph. Deprecating a subgraph returns any signaled GRT to [Curators](/network/curating/). - -- To deprecate or transfer a subgraph, check out [this guide](/managing/transfer-and-deprecate-a-subgraph/#deprecating-a-subgraph). +If you no longer need a published subgraph, you can deprecate or transfer a subgraph. Deprecating a subgraph returns any signaled GRT to [Curators](/network/curating/). To deprecate or transfer a subgraph, check out [this guide](/managing/transfer-and-deprecate-a-subgraph/#deprecating-a-subgraph). ## Network Economics From e0cc9a79c55303a9647cea6930e5c7ddd8ec055f Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Fri, 30 Aug 2024 12:57:47 -0700 Subject: [PATCH 5/7] adjustments --- website/pages/en/network/developing.mdx | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/website/pages/en/network/developing.mdx b/website/pages/en/network/developing.mdx index 890cdb8e3ba0..6b901a0b60d8 100644 --- a/website/pages/en/network/developing.mdx +++ b/website/pages/en/network/developing.mdx @@ -10,12 +10,12 @@ As a developer, you need important data to build and power your dapps. Querying On The Graph, you can: -1. Create, deploy and publish subgraphs to The Graph using Graph CLI and [Subgraph Studio](https://thegraph.com/studio/). +1. Create, deploy, and publish subgraphs to The Graph using Graph CLI and [Subgraph Studio](https://thegraph.com/studio/). 2. Use GraphQL to query live subgraphs and power dapps. ### What is GraphQL? -- [GraphQL](/querying/graphql-api/)is the query language for APIs and a runtime for executing those queries with your existing data. The Graph uses GraphQL to query subgraphs. +- [GraphQL](https://graphql.org/learn/) is the query language for APIs and a runtime for executing those queries with your existing data. The Graph uses GraphQL to query subgraphs. ### Developer Capabilities @@ -49,7 +49,7 @@ Great subgraphs start with a local development environment and unit tests. Devel ## Deploy to Subgraph Studio -Once defined, a subgraph can be deployed to [Subgraph Studio](/deploying/deploying-a-subgraph-to-studio/). In Subgraph Studio, you can do the following: +Once defined, a subgraph can be [deployed to Subgraph Studio](/deploying/deploying-a-subgraph-to-studio/). In Subgraph Studio, you can do the following: - Use its staging environment to index the deployed subgraph and make it available for review. - Verify that your subgraph doesn't have any indexing errors and works as expected. @@ -59,12 +59,12 @@ Once defined, a subgraph can be deployed to [Subgraph Studio](/deploying/deployi When you are happy with your subgraph, you can put it into production and [publish it](/publishing/publishing-a-subgraph/) to The Graph Network. This ensures Indexers can index it. - This is an on-chain action, which registers the subgraph and makes it discoverable by Indexers. -- Published subgraphs have a corresponding NFT, which defines the ownership of the subgraph. You can [transfer the subgraph's ownership](/managing/transfer-and-deprecate-a-subgraph) by sending the NFT. +- Published subgraphs have a corresponding NFT, which defines the ownership of the subgraph. You can [transfer the subgraph's ownership](/managing/transfer-and-deprecate-a-subgraph/) by sending the NFT. - Published subgraphs have associated metadata, which provides other network participants with useful context and information. -## Add Signal for Indexing +## Add Curation Signal for Indexing -Published subgraphs are unlikely to be picked up by Indexers without signal. To encourage indexing you should add signal to your subgraph. Learn more about signaling and [curating](/network/curating/) on The Graph. +Published subgraphs are unlikely to be picked up by Indexers without curation signal. To encourage indexing you should add signal to your subgraph. Learn more about signaling and [curating](/network/curating/) on The Graph. ### What is signal? @@ -91,10 +91,3 @@ To update your subgraph with bug fixes or new functionalities, initiate a transa ## Deprecating & Transferring Subgraphs If you no longer need a published subgraph, you can deprecate or transfer a subgraph. Deprecating a subgraph returns any signaled GRT to [Curators](/network/curating/). To deprecate or transfer a subgraph, check out [this guide](/managing/transfer-and-deprecate-a-subgraph/#deprecating-a-subgraph). - -## Network Economics - -As a developer, you can do any of the following: - -- Lock up GRT to encourage indexing and querying subgraphs. -- Burn GRT whenever a subgraph is updated. From 24a3e5de0697463cbf55b1ef2f8687c01e5ab77d Mon Sep 17 00:00:00 2001 From: Idalith Bustos Date: Thu, 12 Sep 2024 11:42:48 -0700 Subject: [PATCH 6/7] edits --- website/pages/en/network/developing.mdx | 35 +++++++++++-------------- 1 file changed, 16 insertions(+), 19 deletions(-) diff --git a/website/pages/en/network/developing.mdx b/website/pages/en/network/developing.mdx index 6b901a0b60d8..f335480427c4 100644 --- a/website/pages/en/network/developing.mdx +++ b/website/pages/en/network/developing.mdx @@ -2,7 +2,7 @@ title: Developing --- -Learn developer fundamentals and review the basics of a subgraph’s lifecycle. To start coding right away and build on The Graph, go to [Developer Quick Start](/quick-start/). +To start coding right away and build on The Graph, go to [Developer Quick Start](/quick-start/). ## Overview @@ -17,11 +17,11 @@ On The Graph, you can: - [GraphQL](https://graphql.org/learn/) is the query language for APIs and a runtime for executing those queries with your existing data. The Graph uses GraphQL to query subgraphs. -### Developer Capabilities +### Developer Actions - Query subgraphs built by other developers in [The Graph Network](https://thegraph.com/explorer) and integrate them into your own dapps. - Create custom subgraphs to fulfill specific data needs, allowing improved scalability and flexibility for other developers. -- Deploy, publish, and signal your subgraphs within The Graph Network. +- Deploy, publish and signal your subgraphs within The Graph Network. ## Subgraph Specifics @@ -37,57 +37,54 @@ A subgraph primarily consists of the following files: Learn the detailed specifics to [create a subgraph](/developing/creating-a-subgraph/). -### Subgraph Lifecycle +## Subgraph Lifecycle -Here is a general view of a subgraph’s lifecycle: +Here is a general overview of a subgraph’s lifecycle: ![Subgraph Lifecycle](/img/subgraph-lifecycle.png) -### Context for Subgraph Development +### Build locally Great subgraphs start with a local development environment and unit tests. Developers use [Graph CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli), a command-line interface tool for building and deploying subgraphs in The Graph. They can also use [Graph TypeScript](/developing/graph-ts/) and [Matchstick](/developing/unit-testing-framework/) to create robust subgraphs that deploy to The Graph Network. -## Deploy to Subgraph Studio +### Deploy to Subgraph Studio Once defined, a subgraph can be [deployed to Subgraph Studio](/deploying/deploying-a-subgraph-to-studio/). In Subgraph Studio, you can do the following: - Use its staging environment to index the deployed subgraph and make it available for review. - Verify that your subgraph doesn't have any indexing errors and works as expected. -## Publish to the Network +### Publish to the Network -When you are happy with your subgraph, you can put it into production and [publish it](/publishing/publishing-a-subgraph/) to The Graph Network. This ensures Indexers can index it. +When you're happy with your subgraph, you can put it into production and [publish it](/publishing/publishing-a-subgraph/) to The Graph Network. This ensures Indexers can index it. - This is an on-chain action, which registers the subgraph and makes it discoverable by Indexers. - Published subgraphs have a corresponding NFT, which defines the ownership of the subgraph. You can [transfer the subgraph's ownership](/managing/transfer-and-deprecate-a-subgraph/) by sending the NFT. - Published subgraphs have associated metadata, which provides other network participants with useful context and information. -## Add Curation Signal for Indexing +### Add Curation Signal for Indexing Published subgraphs are unlikely to be picked up by Indexers without curation signal. To encourage indexing you should add signal to your subgraph. Learn more about signaling and [curating](/network/curating/) on The Graph. -### What is signal? +#### What is signal? -- Signal is locked GRT associated with a given subgraph. It indicates to indexers that a given subgraph will receive query volume and it contributes to the indexing rewards available for processing it. +- Signal is locked GRT associated with a given subgraph. It indicates to Indexers that a given subgraph will receive query volume and it contributes to the indexing rewards available for processing it. - Third party Curators may also signal on a given subgraph, if they deem the subgraph likely to drive query volume. -## Querying & Application Development +### Querying & Application Development Once a subgraph has been processed by Indexers and is ready to [query](/querying/querying-the-graph/), developers can start using their subgraph in their dapps. - When a query is made, The Graph Network selects an Indexer who has processed the subgraph to serve that query. Query fees are paid in GRT. - Developers must generate an API key and fund it with GRT to make queries, which can be done in [Subgraph Studio](https://thegraph.com/studio/). -- Developers can set a maximum query fee, in order to control their costs, and limit their API key to a given subgraph or origin domain. - - Subgraph Studio provides API key usage data. -- Developers can express an Indexer preference to the gateway, for example preferring Indexers whose query response is faster, or whose data is most up to date. These controls are set in Subgraph Studio. -## Updating Subgraphs +### Updating Subgraphs To update your subgraph with bug fixes or new functionalities, initiate a transaction to point it to the new version. You can deploy new versions of your subgraphs to [Subgraph Studio](https://thegraph.com/studio/) for development and testing. - If you selected "auto-migrate" when you applied the signal, updating the subgraph will migrate any signal to the new version and incur a migration tax. - This signal migration should prompt Indexers to start indexing the new version of the subgraph, so it should soon become available for querying. -## Deprecating & Transferring Subgraphs +### Deprecating & Transferring Subgraphs -If you no longer need a published subgraph, you can deprecate or transfer a subgraph. Deprecating a subgraph returns any signaled GRT to [Curators](/network/curating/). To deprecate or transfer a subgraph, check out [this guide](/managing/transfer-and-deprecate-a-subgraph/#deprecating-a-subgraph). +If you no longer need a published subgraph, you can [deprecate or transfer a subgraph](managing/transfer-and-deprecate-a-subgraph/). Deprecating a subgraph returns any signaled GRT to [Curators](/network/curating/). To deprecate or transfer a subgraph, check out [this guide](/managing/transfer-and-deprecate-a-subgraph/#deprecating-a-subgraph). From 6d3730cc9870d17a9124d176c9bb1f21221e0127 Mon Sep 17 00:00:00 2001 From: Michael Macaulay <56690114+MichaelMacaulay@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:30:29 -0400 Subject: [PATCH 7/7] Edits --- website/pages/en/network/developing.mdx | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/website/pages/en/network/developing.mdx b/website/pages/en/network/developing.mdx index f335480427c4..20b0bfb14535 100644 --- a/website/pages/en/network/developing.mdx +++ b/website/pages/en/network/developing.mdx @@ -2,16 +2,16 @@ title: Developing --- -To start coding right away and build on The Graph, go to [Developer Quick Start](/quick-start/). +To start coding right away, go to [Developer Quick Start](/quick-start/). ## Overview -As a developer, you need important data to build and power your dapps. Querying and indexing that blockchain data can be challenging, but The Graph provides a solution to this issue. +As a developer, you need data to build and power your dapp. Querying and indexing blockchain data is challenging, but The Graph provides a solution to this issue. On The Graph, you can: 1. Create, deploy, and publish subgraphs to The Graph using Graph CLI and [Subgraph Studio](https://thegraph.com/studio/). -2. Use GraphQL to query live subgraphs and power dapps. +2. Use GraphQL to query existing subgraphs. ### What is GraphQL? @@ -45,7 +45,7 @@ Here is a general overview of a subgraph’s lifecycle: ### Build locally -Great subgraphs start with a local development environment and unit tests. Developers use [Graph CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli), a command-line interface tool for building and deploying subgraphs in The Graph. They can also use [Graph TypeScript](/developing/graph-ts/) and [Matchstick](/developing/unit-testing-framework/) to create robust subgraphs that deploy to The Graph Network. +Great subgraphs start with a local development environment and unit tests. Developers use [Graph CLI](https://github.com/graphprotocol/graph-tooling/tree/main/packages/cli), a command-line interface tool for building and deploying subgraphs on The Graph. They can also use [Graph TypeScript](/developing/graph-ts/) and [Matchstick](/developing/unit-testing-framework/) to create robust subgraphs. ### Deploy to Subgraph Studio @@ -56,7 +56,7 @@ Once defined, a subgraph can be [deployed to Subgraph Studio](/deploying/deployi ### Publish to the Network -When you're happy with your subgraph, you can put it into production and [publish it](/publishing/publishing-a-subgraph/) to The Graph Network. This ensures Indexers can index it. +When you're happy with your subgraph, you can [publish it](/publishing/publishing-a-subgraph/) to The Graph Network. - This is an on-chain action, which registers the subgraph and makes it discoverable by Indexers. - Published subgraphs have a corresponding NFT, which defines the ownership of the subgraph. You can [transfer the subgraph's ownership](/managing/transfer-and-deprecate-a-subgraph/) by sending the NFT. @@ -73,10 +73,9 @@ Published subgraphs are unlikely to be picked up by Indexers without curation si ### Querying & Application Development -Once a subgraph has been processed by Indexers and is ready to [query](/querying/querying-the-graph/), developers can start using their subgraph in their dapps. +Subgraphs on The Graph Network receive 100,000 free queries per month, after which point developers can either [pay for queries with GRT or a credit card](/billing/). -- When a query is made, The Graph Network selects an Indexer who has processed the subgraph to serve that query. Query fees are paid in GRT. -- Developers must generate an API key and fund it with GRT to make queries, which can be done in [Subgraph Studio](https://thegraph.com/studio/). +Learn more about [querying subgraphs](/querying/querying-the-graph/). ### Updating Subgraphs