-
Notifications
You must be signed in to change notification settings - Fork 155
Adding Subgraphs Page #795
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
Changes from 3 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
34ecd73
adding page
idalithb 8d54bf0
edits
idalithb 9383663
Update subgraphs.mdx
idalithb e6946c0
Update website/pages/en/subgraphs.mdx
idalithb 8b689fc
Update website/pages/en/subgraphs.mdx
idalithb 1168263
adding page to all lang
idalithb 96f6a66
Update website/pages/en/subgraphs.mdx
idalithb 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
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,41 @@ | ||
--- | ||
title: Subgraphs | ||
--- | ||
|
||
## What is a Subgraph? | ||
|
||
A custom, open API that extracts data from a blockchain, processes it, and stores it so it can be easily queried via GraphQL. | ||
|
||
### Subgraph Capabilities | ||
|
||
- **Access Data:** Subgraphs enable the querying and indexing of blockchain data for web3. | ||
- **Build:** Developers can build, deploy, and publish subgraphs to The Graph Network. To get started, check out the subgraph developer [Quick Start](quick-start/). | ||
- **Index & Query:** Once a subgraph is indexed, anyone can query it. Explore and query all subgraphs published to the network in [Graph Explorer](https://thegraph.com/explorer). | ||
|
||
## Inside a Subgraph | ||
|
||
The subgraph manifest, `subgraph.yaml`, defines the smart contracts & network your subgraph will index, the events from these contracts to pay attention to, and how to map event data to entities that Graph Node stores and allows to query. | ||
|
||
The **subgraph definition** consists of the following files: | ||
|
||
- `subgraph.yaml`: Contains the subgraph manifest | ||
|
||
- `schema.graphql`: A GraphQL schema defining the data stored for your subgraph and how to query it via GraphQL | ||
|
||
- `mapping.ts`: [AssemblyScript Mappings](https://github.com/AssemblyScript/assemblyscript) code that translates event data into entities defined in your schema (e.g. `mapping.ts` in this guide) | ||
idalithb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
To learn more about each of subgraph component, check out [creating a subgraph](/developing/creating-a-subgraph/). | ||
idalithb marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Subgraph Development | ||
|
||
1. [Create a subgraph](/developing/creating-a-subgraph/) | ||
2. [Deploy a subgraph](/deploying/deploying-a-subgraph-to-studio/) | ||
3. [Test a subgraph](/deploying/subgraph-studio/#testing-your-subgraph-in-subgraph-studio) | ||
4. [Publish a subgraph](/publishing/publishing-a-subgraph/) | ||
5. [Signal on a subgraph](/publishing/publishing-a-subgraph/#adding-signal-to-your-subgraph) | ||
|
||
## Subgraph Lifecycle | ||
|
||
Here is a general overview of a subgraph’s lifecycle: | ||
|
||
 |
Oops, something went wrong.
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.