From 44d6901737a57602215a172bcea7536941d07219 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 27 Jul 2022 18:09:08 -0400 Subject: [PATCH 01/14] Add developer role to decentralized network Adding a page that's an overview of what developers do on the decentralized network. --- pages/en/network/developer.mdx | 43 ++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 pages/en/network/developer.mdx diff --git a/pages/en/network/developer.mdx b/pages/en/network/developer.mdx new file mode 100644 index 000000000000..9c36d6871d14 --- /dev/null +++ b/pages/en/network/developer.mdx @@ -0,0 +1,43 @@ +--- +title: Developing +--- + +Developers are a core part of the graph ecosystem. They’re building and querying subgraphs making high-quality data available to users through simple interfaces. + +Anyone can build and deploy a subgraph that queries data from a specific part of the blockchain. + +Once a subgraph has been deployed to the decentralized network, developers can begin making queries to it using GRT. Subgraphs are available to anyone to query data. + +There are 5 steps to a subgraph’s lifecycle. + +## Developing + +The Graph CLI tool streamlines the process of creating a subgraph. When you initialize your subgraph, all the default files will be created and configured. + +When writing your subgraph mappings, you can use the built-APIs or add other libraries as dependencies as long as they are compatible with AssemblyScript. + +Developers can use Matchstick, a unit testing framework, to test the mapping logic in a sandboxed environment to deploy their subgraph with confidence. + +## Deploying + +The Subgraph Studio is where you’ll build, add metadata to, and publish your subgraph to the decentralized explorer. In the Subgraph Studio, you have full control over your subgraphs. You can test them or restrict access with your API keys. + +Anyone can sign in to Subgraph Studio using their wallet via MetaMask or WalletConnect. + +## Publishing + +Once your subgraph is deployed, it's ready to be published to the decentralized network. + +This is where Curators will be able to curating your subgraph and Indexers can begin indexing it. The metadata can be modified at any time using the Subgraph Studio dashboard. + +## Managing + +Subgraph ownership is determined by an NFT based on the ERC-721 standard. Whoever owns the NFT controls the subgraph. + +You can also deprecate your subgraph at any time. This will remove it from The Graph Explorer. Curators will not be able to signal on it anymore, and existing Curators can withdraw their signal at an average share price. + +## Querying + +Anyone can query an existing subgraph by using The Graph Explorer and opening a GraphiQL interface. This will enable them to explore the subgraph by issuing queries and viewing the schema. + +Querying subgraphs using your API keys will generate query fees that will be paid in GRT. From a743e4ff16fe5095181a4ea9e4a8157a772b2103 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:18:13 -0400 Subject: [PATCH 02/14] Update pages/en/network/developer.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benoît Rouleau --- pages/en/network/developer.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/network/developer.mdx b/pages/en/network/developer.mdx index 9c36d6871d14..031826f75e13 100644 --- a/pages/en/network/developer.mdx +++ b/pages/en/network/developer.mdx @@ -2,7 +2,7 @@ title: Developing --- -Developers are a core part of the graph ecosystem. They’re building and querying subgraphs making high-quality data available to users through simple interfaces. +Developers are a core part of The Graph ecosystem. They’re building and querying subgraphs making high-quality data available to users through simple interfaces. Anyone can build and deploy a subgraph that queries data from a specific part of the blockchain. From c72d09eb43e5288f4d2ddd96ff86798b929f23f3 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Tue, 2 Aug 2022 09:18:24 -0400 Subject: [PATCH 03/14] Update pages/en/network/developer.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benoît Rouleau --- pages/en/network/developer.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/network/developer.mdx b/pages/en/network/developer.mdx index 031826f75e13..64c89b88f09d 100644 --- a/pages/en/network/developer.mdx +++ b/pages/en/network/developer.mdx @@ -20,7 +20,7 @@ Developers can use Matchstick, a unit testing framework, to test the mapping log ## Deploying -The Subgraph Studio is where you’ll build, add metadata to, and publish your subgraph to the decentralized explorer. In the Subgraph Studio, you have full control over your subgraphs. You can test them or restrict access with your API keys. +The Subgraph Studio is where you’ll build, add metadata to, and publish your subgraph to the decentralized network. In the Subgraph Studio, you have full control over your subgraphs. You can test them or restrict access with your API keys. Anyone can sign in to Subgraph Studio using their wallet via MetaMask or WalletConnect. From 3ccb091c3b35c181c28ceec61fc158d13a24bc75 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Tue, 2 Aug 2022 17:59:10 -0400 Subject: [PATCH 04/14] Developer role rewrite Rewrote developer page based on new format. --- pages/en/network/developer.mdx | 43 ----------------------- pages/en/network/developing.mdx | 60 +++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 43 deletions(-) delete mode 100644 pages/en/network/developer.mdx create mode 100644 pages/en/network/developing.mdx diff --git a/pages/en/network/developer.mdx b/pages/en/network/developer.mdx deleted file mode 100644 index 64c89b88f09d..000000000000 --- a/pages/en/network/developer.mdx +++ /dev/null @@ -1,43 +0,0 @@ ---- -title: Developing ---- - -Developers are a core part of The Graph ecosystem. They’re building and querying subgraphs making high-quality data available to users through simple interfaces. - -Anyone can build and deploy a subgraph that queries data from a specific part of the blockchain. - -Once a subgraph has been deployed to the decentralized network, developers can begin making queries to it using GRT. Subgraphs are available to anyone to query data. - -There are 5 steps to a subgraph’s lifecycle. - -## Developing - -The Graph CLI tool streamlines the process of creating a subgraph. When you initialize your subgraph, all the default files will be created and configured. - -When writing your subgraph mappings, you can use the built-APIs or add other libraries as dependencies as long as they are compatible with AssemblyScript. - -Developers can use Matchstick, a unit testing framework, to test the mapping logic in a sandboxed environment to deploy their subgraph with confidence. - -## Deploying - -The Subgraph Studio is where you’ll build, add metadata to, and publish your subgraph to the decentralized network. In the Subgraph Studio, you have full control over your subgraphs. You can test them or restrict access with your API keys. - -Anyone can sign in to Subgraph Studio using their wallet via MetaMask or WalletConnect. - -## Publishing - -Once your subgraph is deployed, it's ready to be published to the decentralized network. - -This is where Curators will be able to curating your subgraph and Indexers can begin indexing it. The metadata can be modified at any time using the Subgraph Studio dashboard. - -## Managing - -Subgraph ownership is determined by an NFT based on the ERC-721 standard. Whoever owns the NFT controls the subgraph. - -You can also deprecate your subgraph at any time. This will remove it from The Graph Explorer. Curators will not be able to signal on it anymore, and existing Curators can withdraw their signal at an average share price. - -## Querying - -Anyone can query an existing subgraph by using The Graph Explorer and opening a GraphiQL interface. This will enable them to explore the subgraph by issuing queries and viewing the schema. - -Querying subgraphs using your API keys will generate query fees that will be paid in GRT. diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx new file mode 100644 index 000000000000..47bde7fdd888 --- /dev/null +++ b/pages/en/network/developing.mdx @@ -0,0 +1,60 @@ +--- +title: Developing +--- + +Developers are a core part of The Graph. They are responsible for both building and querying subgraphs, unlocking data for the web3 ecosystem. + +## Building Subgraphs + +Developers that build subgraphs use the [GraphQL Schema Language](https://graphql.org/learn/schema-language/) to define the data they want to make available. + +The Graph CLI tool streamlines subgraph creation. When you initialize your subgraph, all the default files will be created & configured. +Developers can use the built-in APIs or add other libraries as dependencies as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). +Subgraphs should be thoroughly tested before deployment. Developers can use [MatchStick](https://github.com/LimeChain/matchstick) to test the mapping logic in a sandboxed environment. +Once your subgraph is built & tested, it can be deployed to The Graph's decentralized network. However, before anyone can begin querying it, your subgraph must be curated & indexed. + +### Curation + +Curators use their knowledge of web3 to assess and signal new subgraphs. They look for subgraphs with reliable and relevant data. + +Curators stake GRT with the subgraph and receive curation shares, which guarantee a percentage of future query fees. The curation signal increases as more Curators signal on the subgraph. + +A strong curation signal is crucial to a subgraph. Indexers use the curation signal to determine which subgraphs to index to the network, making it available for querying. + +### Deploying on the network + +By deploying your subgraph to The Graph network, you're making that data available to developers and users across the web3 ecosystem. Anyone will be able to query it. + +Data from your subgraph can be used to improve user experience, build new features, or even create entirely new applications. + +## Querying Subgraphs + +Developers that query subgraphs serve it to users through a simple interface. They can use the GraphQL API to query data directly from the blockchain. +Developers can manipulate, sort, or aggregate the data any way they want. + +Querying a subgraph with your API key will generate query fees that can be paid in GRT. + +### How Billing Works + +Developers that query a subgraph can use GRT to pay the query fees. This fee is split between different network participants, including the Indexers, Curators, and Delegators. + +Your account on [Subgraph Studio](https://thegraph.com/studio/) must have a positive balance of GRT, which will be used to pay for query fees to the network. +Maintaining a positive balance for an account is the responsibility of the user or dapp. + +There are two ways to be notified of your query fee balance. The first is to set up a billing alert that will be sent to an [email address](https://thegraph.com/studio/settings/). +Another way is by querying the [billing subgraph](https://thegraph.com/hosted-service/subgraph/graphprotocol/billing?query=Nena%20account) API directly. + +Learn how to prioritize price, speed, data freshness (among other factors) for your queries by watching [this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0). + +> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, indexers will stop serving queries for all API Keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. + +### Paying Query Fees with GRT + +You can use GRT to pay for query fees by visiting the [Subgraph Studio](https://thegraph.com/studio/). Connect your wallet and click on billing to view your dashboard. +Here, you'll see any costs you've accrued. In order to ad GRT to your account, you'll need to add Matic to your [crypto wallet](https://docs.polygon.technology/docs/develop/metamask/config-polygon-on-metamask/). +Subgraph enables you to easily bridge your GRT from Ethereum to Polygon. + +Once you've added GRT to your account, it will automatically cover query fees. + +You can learn how to (re)fill your query fee balance by watching [this video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5). + From e4c32a9c43c4b271a946f54e7683f53e6b78b935 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 3 Aug 2022 17:37:45 -0400 Subject: [PATCH 05/14] Fixing loom links Added the proper formatting for video links --- pages/en/network/developing.mdx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx index 47bde7fdd888..6102374c9bf3 100644 --- a/pages/en/network/developing.mdx +++ b/pages/en/network/developing.mdx @@ -44,7 +44,16 @@ Maintaining a positive balance for an account is the responsibility of the user There are two ways to be notified of your query fee balance. The first is to set up a billing alert that will be sent to an [email address](https://thegraph.com/studio/settings/). Another way is by querying the [billing subgraph](https://thegraph.com/hosted-service/subgraph/graphprotocol/billing?query=Nena%20account) API directly. -Learn how to prioritize price, speed, data freshness (among other factors) for your queries by watching [this video](https://www.loom.com/share/b5fc533e48584cb694017392c80c75e0). +Learn how to prioritize price, speed, data freshness (among other factors) for your queries by watching this video. + +
+ + > IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, indexers will stop serving queries for all API Keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. @@ -56,5 +65,14 @@ Subgraph enables you to easily bridge your GRT from Ethereum to Polygon. Once you've added GRT to your account, it will automatically cover query fees. -You can learn how to (re)fill your query fee balance by watching [this video](https://www.loom.com/share/a81de6ef11d64c62872ea210c58c6af5). +You can learn how to (re)fill your query fee balance by watching this video. + +
+ + From 1021e83af02f1ff568b7b1e57102050f21c296b1 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Thu, 4 Aug 2022 13:51:36 -0400 Subject: [PATCH 06/14] Fixing closing tags Fixed the closing tags on the figure for videos --- pages/en/network/developing.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx index 6102374c9bf3..8876635ab884 100644 --- a/pages/en/network/developing.mdx +++ b/pages/en/network/developing.mdx @@ -53,7 +53,7 @@ Learn how to prioritize price, speed, data freshness (among other factors) for y frameborder="0" allowfullscreen > - +
> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, indexers will stop serving queries for all API Keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. @@ -74,5 +74,5 @@ You can learn how to (re)fill your query fee balance by watching this video. frameborder="0" allowfullscreen > - +
From 988595bff79f3c4965974690f1abab57fd3593cc Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Wed, 10 Aug 2022 11:15:44 -0400 Subject: [PATCH 07/14] updating navigation Added developer page to nav --- navigation/navigation.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/navigation/navigation.ts b/navigation/navigation.ts index eeee15e1dd88..710b5da9301b 100644 --- a/navigation/navigation.ts +++ b/navigation/navigation.ts @@ -27,6 +27,9 @@ export const navigation = (locale: AppLocale): NavItemDefinition[] => [ { slug: 'curating', }, + { + slug: 'developing', + }, { slug: 'explorer', }, From d6d3cb0346c950c7fd0428ba9ba602968f148d71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benoi=CC=82t=20Rouleau?= Date: Thu, 11 Aug 2022 11:31:33 -0400 Subject: [PATCH 08/14] Use `VideoEmbed` component in `network/developing` page --- pages/en/network/developing.mdx | 39 +++++++-------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx index 8876635ab884..6b00c37bd6c3 100644 --- a/pages/en/network/developing.mdx +++ b/pages/en/network/developing.mdx @@ -8,10 +8,7 @@ Developers are a core part of The Graph. They are responsible for both building Developers that build subgraphs use the [GraphQL Schema Language](https://graphql.org/learn/schema-language/) to define the data they want to make available. -The Graph CLI tool streamlines subgraph creation. When you initialize your subgraph, all the default files will be created & configured. -Developers can use the built-in APIs or add other libraries as dependencies as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). -Subgraphs should be thoroughly tested before deployment. Developers can use [MatchStick](https://github.com/LimeChain/matchstick) to test the mapping logic in a sandboxed environment. -Once your subgraph is built & tested, it can be deployed to The Graph's decentralized network. However, before anyone can begin querying it, your subgraph must be curated & indexed. +The Graph CLI tool streamlines subgraph creation. When you initialize your subgraph, all the default files will be created & configured. Developers can use the built-in APIs or add other libraries as dependencies as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Subgraphs should be thoroughly tested before deployment. Developers can use [MatchStick](https://github.com/LimeChain/matchstick) to test the mapping logic in a sandboxed environment. Once your subgraph is built & tested, it can be deployed to The Graph's decentralized network. However, before anyone can begin querying it, your subgraph must be curated & indexed. ### Curation @@ -29,8 +26,7 @@ Data from your subgraph can be used to improve user experience, build new featur ## Querying Subgraphs -Developers that query subgraphs serve it to users through a simple interface. They can use the GraphQL API to query data directly from the blockchain. -Developers can manipulate, sort, or aggregate the data any way they want. +Developers that query subgraphs serve it to users through a simple interface. They can use the GraphQL API to query data directly from the blockchain. Developers can manipulate, sort, or aggregate the data any way they want. Querying a subgraph with your API key will generate query fees that can be paid in GRT. @@ -38,41 +34,22 @@ Querying a subgraph with your API key will generate query fees that can be paid Developers that query a subgraph can use GRT to pay the query fees. This fee is split between different network participants, including the Indexers, Curators, and Delegators. -Your account on [Subgraph Studio](https://thegraph.com/studio/) must have a positive balance of GRT, which will be used to pay for query fees to the network. -Maintaining a positive balance for an account is the responsibility of the user or dapp. +Your account on [Subgraph Studio](https://thegraph.com/studio/) must have a positive balance of GRT, which will be used to pay for query fees to the network. Maintaining a positive balance for an account is the responsibility of the user or dapp. -There are two ways to be notified of your query fee balance. The first is to set up a billing alert that will be sent to an [email address](https://thegraph.com/studio/settings/). -Another way is by querying the [billing subgraph](https://thegraph.com/hosted-service/subgraph/graphprotocol/billing?query=Nena%20account) API directly. +There are two ways to be notified of your query fee balance. The first is to set up a billing alert that will be sent to an [email address](https://thegraph.com/studio/settings/). Another way is by querying the [billing subgraph](https://thegraph.com/hosted-service/subgraph/graphprotocol/billing?query=Nena%20account) API directly. Learn how to prioritize price, speed, data freshness (among other factors) for your queries by watching this video. -
- -
+ -> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, indexers will stop serving queries for all API Keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. +> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, indexers will stop serving queries for all API Keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. ### Paying Query Fees with GRT -You can use GRT to pay for query fees by visiting the [Subgraph Studio](https://thegraph.com/studio/). Connect your wallet and click on billing to view your dashboard. -Here, you'll see any costs you've accrued. In order to ad GRT to your account, you'll need to add Matic to your [crypto wallet](https://docs.polygon.technology/docs/develop/metamask/config-polygon-on-metamask/). -Subgraph enables you to easily bridge your GRT from Ethereum to Polygon. +You can use GRT to pay for query fees by visiting the [Subgraph Studio](https://thegraph.com/studio/). Connect your wallet and click on billing to view your dashboard. Here, you'll see any costs you've accrued. In order to ad GRT to your account, you'll need to add Matic to your [crypto wallet](https://docs.polygon.technology/docs/develop/metamask/config-polygon-on-metamask/). Subgraph enables you to easily bridge your GRT from Ethereum to Polygon. Once you've added GRT to your account, it will automatically cover query fees. You can learn how to (re)fill your query fee balance by watching this video. -
- -
- + From 0375b0a97bcdc9388b44ce46886649eab3e9d61d Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:19:54 -0400 Subject: [PATCH 09/14] Update pages/en/network/developing.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benoît Rouleau --- pages/en/network/developing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx index 6b00c37bd6c3..186b3094ef54 100644 --- a/pages/en/network/developing.mdx +++ b/pages/en/network/developing.mdx @@ -42,7 +42,7 @@ Learn how to prioritize price, speed, data freshness (among other factors) for y -> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, indexers will stop serving queries for all API Keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. +> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, indexers will stop serving queries for all API keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. ### Paying Query Fees with GRT From 26067cea55415116069c0ff3c064b651adf1ab28 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Thu, 11 Aug 2022 12:19:59 -0400 Subject: [PATCH 10/14] Update pages/en/network/developing.mdx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Benoît Rouleau --- pages/en/network/developing.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx index 186b3094ef54..620354f461af 100644 --- a/pages/en/network/developing.mdx +++ b/pages/en/network/developing.mdx @@ -46,7 +46,7 @@ Learn how to prioritize price, speed, data freshness (among other factors) for y ### Paying Query Fees with GRT -You can use GRT to pay for query fees by visiting the [Subgraph Studio](https://thegraph.com/studio/). Connect your wallet and click on billing to view your dashboard. Here, you'll see any costs you've accrued. In order to ad GRT to your account, you'll need to add Matic to your [crypto wallet](https://docs.polygon.technology/docs/develop/metamask/config-polygon-on-metamask/). Subgraph enables you to easily bridge your GRT from Ethereum to Polygon. +You can use GRT to pay for query fees by visiting the [Subgraph Studio](https://thegraph.com/studio/). Connect your wallet and click on billing to view your dashboard. Here, you'll see any costs you've accrued. In order to add GRT to your account, you'll need to add Matic to your [crypto wallet](https://docs.polygon.technology/docs/develop/metamask/config-polygon-on-metamask/). Subgraph enables you to easily bridge your GRT from Ethereum to Polygon. Once you've added GRT to your account, it will automatically cover query fees. From d7ec15bf11bacf37b31919d89433e1a09f4a1c01 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Fri, 19 Aug 2022 17:03:19 -0400 Subject: [PATCH 11/14] Update developing.mdx Incorporating Adam's feedback: -More high-level -Technical distinctions -Removing unfitting section --- pages/en/network/developing.mdx | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx index 620354f461af..998e0b734191 100644 --- a/pages/en/network/developing.mdx +++ b/pages/en/network/developing.mdx @@ -2,36 +2,39 @@ title: Developing --- -Developers are a core part of The Graph. They are responsible for both building and querying subgraphs, unlocking data for the web3 ecosystem. +Developers are a core part of The Graph ecosystem. They are responsible for both building and querying subgraphs, unlocking data for the web3 ecosystem. ## Building Subgraphs -Developers that build subgraphs use the [GraphQL Schema Language](https://graphql.org/learn/schema-language/) to define the data they want to make available. +Developers can build subgraphs, open APIs, and deploy them locally or in the [Subgraph Studio](https://thegraph.com/studio/). -The Graph CLI tool streamlines subgraph creation. When you initialize your subgraph, all the default files will be created & configured. Developers can use the built-in APIs or add other libraries as dependencies as long as they are compatible with [AssemblyScript](https://github.com/AssemblyScript/assemblyscript). Subgraphs should be thoroughly tested before deployment. Developers can use [MatchStick](https://github.com/LimeChain/matchstick) to test the mapping logic in a sandboxed environment. Once your subgraph is built & tested, it can be deployed to The Graph's decentralized network. However, before anyone can begin querying it, your subgraph must be curated & indexed. +Once published and indexed to the The Graph Network, anyone can query the subgraph with [GraphQL](https://graphql.org/learn/schema-language/) and use it in their protocol or applications. ### Curation -Curators use their knowledge of web3 to assess and signal new subgraphs. They look for subgraphs with reliable and relevant data. +Subgraph developers often curate their own subgraph. This proves to Indexers that they've published a high-quality subgraph to the network and attracts additional Curators. Curators stake GRT with the subgraph and receive curation shares, which guarantee a percentage of future query fees. The curation signal increases as more Curators signal on the subgraph. -A strong curation signal is crucial to a subgraph. Indexers use the curation signal to determine which subgraphs to index to the network, making it available for querying. +A strong curation signal is crucial because Indexers use the curation signal to determine which subgraphs to index to the network, making it available for querying. -### Deploying on the network +### Publishing on the Network -By deploying your subgraph to The Graph network, you're making that data available to developers and users across the web3 ecosystem. Anyone will be able to query it. +By deploying your subgraph to The Graph Network, you're making that data available to developers and users across the web3 ecosystem. Anyone will be able to query it. Data from your subgraph can be used to improve user experience, build new features, or even create entirely new applications. ## Querying Subgraphs -Developers that query subgraphs serve it to users through a simple interface. They can use the GraphQL API to query data directly from the blockchain. Developers can manipulate, sort, or aggregate the data any way they want. +Developers that query subgraphs serve it to users through a simple interface. They can use the GraphQL API to query data from the subgraph's processed database. Developers can manipulate, sort, or aggregate the data any way they want. + +When you query a subgraph on The Graph Network, it will be served by one of the Indexers who has chosen to index that subgraph. Queries incur query fees, which are paid in GRT. These fees are managed and deducted via a Gateway, which matches consumers and Indexers, and keeps track of consumer spending via API keys. -Querying a subgraph with your API key will generate query fees that can be paid in GRT. ### How Billing Works +> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, Indexers will stop serving queries for all API keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. + Developers that query a subgraph can use GRT to pay the query fees. This fee is split between different network participants, including the Indexers, Curators, and Delegators. Your account on [Subgraph Studio](https://thegraph.com/studio/) must have a positive balance of GRT, which will be used to pay for query fees to the network. Maintaining a positive balance for an account is the responsibility of the user or dapp. @@ -41,15 +44,3 @@ There are two ways to be notified of your query fee balance. The first is to set Learn how to prioritize price, speed, data freshness (among other factors) for your queries by watching this video. - -> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, indexers will stop serving queries for all API keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. - -### Paying Query Fees with GRT - -You can use GRT to pay for query fees by visiting the [Subgraph Studio](https://thegraph.com/studio/). Connect your wallet and click on billing to view your dashboard. Here, you'll see any costs you've accrued. In order to add GRT to your account, you'll need to add Matic to your [crypto wallet](https://docs.polygon.technology/docs/develop/metamask/config-polygon-on-metamask/). Subgraph enables you to easily bridge your GRT from Ethereum to Polygon. - -Once you've added GRT to your account, it will automatically cover query fees. - -You can learn how to (re)fill your query fee balance by watching this video. - - From 28c3e984882766a7231e16dcf0d9cfce6d6bea82 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Mon, 22 Aug 2022 12:05:48 -0400 Subject: [PATCH 12/14] Updates Fixing a few things --- pages/en/network/developing.mdx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx index 998e0b734191..76a657c22024 100644 --- a/pages/en/network/developing.mdx +++ b/pages/en/network/developing.mdx @@ -8,11 +8,11 @@ Developers are a core part of The Graph ecosystem. They are responsible for both Developers can build subgraphs, open APIs, and deploy them locally or in the [Subgraph Studio](https://thegraph.com/studio/). -Once published and indexed to the The Graph Network, anyone can query the subgraph with [GraphQL](https://graphql.org/learn/schema-language/) and use it in their protocol or applications. +Once a subgraph has been published to The Graph Network and indexed by Indexers, anyone can query the subgraph with [GraphQL](https://graphql.org/learn/schema-language/) and use it in their protocol or applications. ### Curation -Subgraph developers often curate their own subgraph. This proves to Indexers that they've published a high-quality subgraph to the network and attracts additional Curators. +Subgraph developers often curate their own subgraph. This often attracts additional Curators and helps get the subgraph indexed by Indexers. Curators stake GRT with the subgraph and receive curation shares, which guarantee a percentage of future query fees. The curation signal increases as more Curators signal on the subgraph. @@ -20,20 +20,21 @@ A strong curation signal is crucial because Indexers use the curation signal to ### Publishing on the Network -By deploying your subgraph to The Graph Network, you're making that data available to developers and users across the web3 ecosystem. Anyone will be able to query it. +By publishing your subgraph to The Graph Network, you're making that data available to developers and users across the web3 ecosystem. Anyone will be able to query it. Data from your subgraph can be used to improve user experience, build new features, or even create entirely new applications. ## Querying Subgraphs -Developers that query subgraphs serve it to users through a simple interface. They can use the GraphQL API to query data from the subgraph's processed database. Developers can manipulate, sort, or aggregate the data any way they want. +Developers that query subgraphs can serve it to users through any user interface. They can use the GraphQL API to query data from the subgraph's processed database. Developers can manipulate, sort, or aggregate the data any way they want. When you query a subgraph on The Graph Network, it will be served by one of the Indexers who has chosen to index that subgraph. Queries incur query fees, which are paid in GRT. These fees are managed and deducted via a Gateway, which matches consumers and Indexers, and keeps track of consumer spending via API keys. ### How Billing Works -> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, Indexers will stop serving queries for all API keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. +> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, Indexers will stop serving queries for all API keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. Query payments are facilitated by Gateways, which match incoming queries with suitable Indexers. Consumers must use an API key when making queries on the network via a Gateway. API keys can be managed via the Subgraph Studio, including keeping API keys sufficiently funded with GRT to pay for queries. Indexers receive vouchers for answering queries, which can be redeemed for GRT from the API key's balance. + Developers that query a subgraph can use GRT to pay the query fees. This fee is split between different network participants, including the Indexers, Curators, and Delegators. From 15d8cbbbdda6e1f2e4cdecb99efbb27bfdd506fa Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Thu, 1 Sep 2022 15:23:16 -0400 Subject: [PATCH 13/14] Developer Role Updates --- pages/en/network/developing.mdx | 46 ++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 21 deletions(-) diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx index 76a657c22024..8ca65e68818e 100644 --- a/pages/en/network/developing.mdx +++ b/pages/en/network/developing.mdx @@ -2,46 +2,50 @@ title: Developing --- -Developers are a core part of The Graph ecosystem. They are responsible for both building and querying subgraphs, unlocking data for the web3 ecosystem. +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. -## Building Subgraphs +## Subgraph Lifecycle -Developers can build subgraphs, open APIs, and deploy them locally or in the [Subgraph Studio](https://thegraph.com/studio/). +Subgraphs deployed to the network have a defined lifecycle. -Once a subgraph has been published to The Graph Network and indexed by Indexers, anyone can query the subgraph with [GraphQL](https://graphql.org/learn/schema-language/) and use it in their protocol or applications. +#### Build locally -### Curation +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, the hosted service 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. -Subgraph developers often curate their own subgraph. This often attracts additional Curators and helps get the subgraph indexed by Indexers. +> There are certain constraints on The Graph Network, in terms of feature and network support. Currently only mainnet Ethereum subgraphs will earn indexing rewards, and subgraphs which fetch data from IPFS are also not eligible. -Curators stake GRT with the subgraph and receive curation shares, which guarantee a percentage of future query fees. The curation signal increases as more Curators signal on the subgraph. +#### Deploy to the Subgraph Studio -A strong curation signal is crucial because Indexers use the curation signal to determine which subgraphs to index to the network, making it available for querying. +Once defined, the subgraph can be built and deployed to the [Subgraph Studio](https://thegraph.com/docs/en/deploying/subgraph-studio-faqs/). The 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. -### Publishing on the Network +#### Publish to the Network -By publishing your subgraph to The Graph Network, you're making that data available to developers and users across the web3 ecosystem. Anyone will be able to query it. +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. -Data from your subgraph can be used to improve user experience, build new features, or even create entirely new applications. +#### Signal to Encourage Indexing -## Querying Subgraphs +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. -Developers that query subgraphs can serve it to users through any user interface. They can use the GraphQL API to query data from the subgraph's processed database. Developers can manipulate, sort, or aggregate the data any way they want. +#### Querying & Application Development -When you query a subgraph on The Graph Network, it will be served by one of the Indexers who has chosen to index that subgraph. Queries incur query fees, which are paid in GRT. These fees are managed and deducted via a Gateway, which matches consumers and Indexers, and keeps track of consumer spending via API keys. +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. +In order to make queries, developers must generate an API key, which can be done in the 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. The Subgraph Studio provides developers with data on their API key usage over itme. -### How Billing Works +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 the Subgraph Studio. -> IMPORTANT: When an account reaches a 0 GRT balance and the billing invoice is not paid in a timely manner, Indexers will stop serving queries for all API keys associated with the account. Indexers will automatically start serving queries again once the billing balance is paid in full and GRT is added to the account for future query fees. Query payments are facilitated by Gateways, which match incoming queries with suitable Indexers. Consumers must use an API key when making queries on the network via a Gateway. API keys can be managed via the Subgraph Studio, including keeping API keys sufficiently funded with GRT to pay for queries. Indexers receive vouchers for answering queries, which can be redeemed for GRT from the API key's balance. +#### Upgrading Subgraphs +After a time a subgraph developer may want to update their subgraph, perhaps fixing a bug or adding new functionality. This requires another on-chain action to indicate the new version, which updates the specific subgraph manifest file associated with the subgraph. Upgrading 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. -Developers that query a subgraph can use GRT to pay the query fees. This fee is split between different network participants, including the Indexers, Curators, and Delegators. +#### Deprecating Subgraphs -Your account on [Subgraph Studio](https://thegraph.com/studio/) must have a positive balance of GRT, which will be used to pay for query fees to the network. Maintaining a positive balance for an account is the responsibility of the user or dapp. +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. -There are two ways to be notified of your query fee balance. The first is to set up a billing alert that will be sent to an [email address](https://thegraph.com/studio/settings/). Another way is by querying the [billing subgraph](https://thegraph.com/hosted-service/subgraph/graphprotocol/billing?query=Nena%20account) API directly. +### Diverse Developer Roles -Learn how to prioritize price, speed, data freshness (among other factors) for your queries by watching this video. +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. - +## Developers and Network Economics + +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 upgraded. From 18423846172c367a246d9d3a9f0323445f590587 Mon Sep 17 00:00:00 2001 From: "Micmac.eth" <56690114+MichaelMacaulay@users.noreply.github.com> Date: Thu, 15 Sep 2022 10:02:48 -0400 Subject: [PATCH 14/14] Upgrading subgraphs info MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adding more detail on upgrading subgraphs based on Ørjan's comment --- pages/en/network/developing.mdx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pages/en/network/developing.mdx b/pages/en/network/developing.mdx index 8ca65e68818e..d531081be7f2 100644 --- a/pages/en/network/developing.mdx +++ b/pages/en/network/developing.mdx @@ -36,7 +36,9 @@ Developers are also able to express an Indexer preference to the gateway, for ex #### Upgrading Subgraphs -After a time a subgraph developer may want to update their subgraph, perhaps fixing a bug or adding new functionality. This requires another on-chain action to indicate the new version, which updates the specific subgraph manifest file associated with the subgraph. Upgrading 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. +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 the Subgraph Studio for rate-limited development and testing. + +Once the Subgraph Developer is ready to upgrade, they can initiate a transaction to point their subgraph at the new version. Upgrading 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. #### Deprecating Subgraphs