Skip to content
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

Adding Table of Contents #1945

Merged
merged 3 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .prettierrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import prettierConfig from '@theguild/prettier-config';

export default {
...prettierConfig,
overrides: [
...(prettierConfig.overrides || []),
{
files: '*.md{,x}',
options: {
semi: false,
trailingComma: 'none',
proseWrap: 'preserve',
},
},
],
};
1 change: 0 additions & 1 deletion .prettierrc.json

This file was deleted.

46 changes: 44 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,46 @@
# Example Subgraphs

A collection of subgraph examples to help developers get started with The Graph. Please see
[the documentation](https://thegraph.com/docs) for more information.
This section contains several subgraph examples to help you get started with [The Graph](https://thegraph.com/). Each example demonstrates specific configurations and assumes basic familiarity with subgraph components.

## Table of Contents

1. **[Aggregations](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/aggregations)**
This example demonstrates how to aggregate data using block numbers as predictable values. The comments in the schema, subgraph manifest, and mappings provide guidance for implementing custom aggregations.

2. **[Arweave Blocks and Transactions](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/arweave-blocks-transactions)**
This example indexes blocks, transactions, tags, and POAs on the Arweave blockchain. Please note that it requires `graph-cli` version 0.30.2 or above to build.

3. **[Cosmos Block Filtering](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-block-filtering)**
This example stores `Block` objects that represent blocks appended to a Cosmos chain, saving only the block number and timestamp to the store.

4. **[Cosmos Osmosis Token Swaps](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-osmosis-token-swaps)**
This example stores `TokenSwap` objects that represent token swaps made using the Generalized Automated Market Maker (GAMM) in the Osmosis chain.

5. **[Cosmos Validator Delegations](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-validator-delegations)**
This example stores `Delegation` objects representing validator delegations on a Cosmos chain.

6. **[Cosmos Validator Rewards](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/cosmos-validator-rewards)**
This example stores `Reward` objects representing rewards received by validators on a Cosmos chain.

7. **[Ethereum Basic Event Handlers](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/ethereum-basic-event-handlers)**
This example shows how to handle basic events on the Ethereum blockchain using The Graph. It provides a practical implementation of event handlers, showcasing how to index and query blockchain data.

8. **[Ethereum Gravatar](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/ethereum-gravatar)**
This example indexes data from the Ethereum Gravatar smart contract. Gravatar is a service where users can create and manage globally unique avatars.

9. **[Example Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/example-subgraph)**
This example shows the structure of a minimal,basic subgraph. It provides a generic setup with a simple contract and schema designed to teach the fundamentals of defining, mapping, and querying subgraph data.

10. **[Matic Lens Protocol Posts Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/matic-lens-protocol-posts-subgraph)**
This example demonstrates how to index data from the Lens Protocol deployed on the Polygon (Matic) network.

11. **[NEAR Blocks](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/near-blocks)**
This example indexes blockchain data from the NEAR Protocol. It listens to block-related events and stores key data such as block number, timestamp, and hash in a queryable format.

12. **[NEAR Receipts](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/near-receipts)**
This example indexes transaction receipts from the NEAR Protocol. It tracks and stores receipt data such as transaction hash, status, and execution details.

13. **[Substreams Powered Subgraph](https://github.com/graphprotocol/graph-tooling/tree/adding-table/examples/substreams-powered-subgraph)**
This example is a basic Substreams-powered subgraph, which includes the Substreams definition. It tracks new contract deployments on Ethereum and demonstrates integration with Graph Node using `substreams_entity_change` types and helpers.

To learn more about subgraphs, review [subgraphs](https://thegraph.com/docs/en/subgraphs/developing/subgraphs/) on [The Graph docs](https://thegraph.com/docs/en/).
Loading