Skip to content

vkpatva/react-frontend-using-subgraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

React Subgraph Template

This template provides a quick start for building React applications with Subgraph integration for your smart contract. It includes components for handling deposits and withdrawals using subgraph queries, along with the MUI X Data Grid for creating tables.

Quick Start

Follow these steps to get started with the template:

  1. Clone the repository:
git clone https://github.com/vkpatva/react-frontend-using-subgraph
cd subgraph-tutorial
  1. Install packages:
npm install
  1. Run the development server:
npm run dev

This will start the development server and you can access the app at http://localhost:5173.

Package Details

This template comes with the following packages pre-configured:

  • MUI X Data Grid - A powerful grid component for building tables with sorting, filtering, and more.
  • @apollo/client - Apollo Client for querying GraphQL APIs, essential for interacting with subgraphs.

Components

The /components directory contains two key components:

  • Deposit: This component handles deposits and queries a subgraph to retrieve deposit-related data.
  • Withdraw: Similar to Deposit, this component handles withdrawals and queries the subgraph accordingly.

Both components demonstrate how to integrate subgraph queries for interacting with Web 3 data.

Contributions

Feel free to contribute to this template by opening issues or pull requests on the GitHub repository. Your contributions are highly appreciated!

License

This template is open-source and available under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published