Skip to content

Commit

Permalink
adding page
Browse files Browse the repository at this point in the history
  • Loading branch information
idalithb committed Oct 15, 2024
1 parent c572f67 commit 34ecd73
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
2 changes: 1 addition & 1 deletion website/next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information.
// see https://nextjs.org/docs/basic-features/typescript for more information.
1 change: 1 addition & 0 deletions website/pages/en/_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default {
title: 'Subgraphs',
},
'quick-start': '',
subgraphs: '',
developing: 'Developing',
deploying: 'Deploying',
publishing: 'Publishing',
Expand Down
42 changes: 42 additions & 0 deletions website/pages/en/subgraphs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
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.

### Subgraphs Capabilities

- Developers can build, deploy, and publish subgraphs to The Graph Network.
- To get started, check out the subgraph developer [Quick Start](quick-start/).
- 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)

To learn more about each of subgraph component, check out [creating a subgraph](/developing/creating-a-subgraph/).

## 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:

![Subgraph Lifecycle](/img/subgraph-lifecycle.png)

0 comments on commit 34ecd73

Please sign in to comment.