-
Notifications
You must be signed in to change notification settings - Fork 156
Add developer role to decentralized network #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
44d6901
Add developer role to decentralized network
MichaelMacaulay a743e4f
Update pages/en/network/developer.mdx
MichaelMacaulay c72d09e
Update pages/en/network/developer.mdx
MichaelMacaulay 3ccb091
Developer role rewrite
MichaelMacaulay e4c32a9
Fixing loom links
MichaelMacaulay 1021e83
Fixing closing tags
MichaelMacaulay 988595b
updating navigation
MichaelMacaulay 775de0f
Merge branch 'main' into developer-role
benface d6d3cb0
Use `VideoEmbed` component in `network/developing` page
benface 0375b0a
Update pages/en/network/developing.mdx
MichaelMacaulay 26067ce
Update pages/en/network/developing.mdx
MichaelMacaulay d7ec15b
Update developing.mdx
MichaelMacaulay 28c3e98
Updates
MichaelMacaulay 15d8cbb
Developer Role Updates
MichaelMacaulay 1842384
Upgrading subgraphs info
MichaelMacaulay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| --- | ||
| 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. | ||
|
|
||
| ## Subgraph Lifecycle | ||
|
|
||
| Subgraphs deployed to the network have a defined lifecycle. | ||
|
|
||
| #### Build locally | ||
|
|
||
| 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. | ||
|
|
||
| > 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. | ||
|
|
||
| #### Deploy to the Subgraph Studio | ||
|
|
||
| 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. | ||
|
|
||
| #### Publish to the Network | ||
|
|
||
| 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. | ||
|
|
||
| #### Signal to Encourage Indexing | ||
|
|
||
| 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. | ||
|
|
||
| #### Querying & Application Development | ||
|
|
||
| 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. | ||
|
|
||
| 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. | ||
|
|
||
| #### 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. | ||
|
|
||
| #### Deprecating Subgraphs | ||
|
|
||
| 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. | ||
|
|
||
| ### Diverse Developer Roles | ||
|
|
||
| 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. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.