https://github.com/graphprotocol/full-stack-graph-app
Deploy a full stack app leveraging The Graph with one click.
https://github.com/graphprotocol/full-stack-graph-app
Last synced: 10 months ago
JSON representation
Deploy a full stack app leveraging The Graph with one click.
- Host: GitHub
- URL: https://github.com/graphprotocol/full-stack-graph-app
- Owner: graphprotocol
- Created: 2021-08-05T16:49:33.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-03-23T00:21:41.000Z (almost 4 years ago)
- Last Synced: 2025-03-23T18:51:48.699Z (10 months ago)
- Language: TypeScript
- Size: 18.7 MB
- Stars: 10
- Watchers: 6
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## Query NFT data with a Subgraph in your Browser
This is an example app to show you how to [query data from a Subgraph](https://thegraph.com/docs/developer/query-the-graph#querying-from-your-app) from a client-side application.
The project includes a front-end application built with Next.js that queries NFT data from a subgraph that indexes data from the [Foundation smart contracts](https://fnd.dev/).
## Deployment options
### 1. Automate with Gitpod in Browser
You can deploy this project with Gitpod by clicking here:
[](https://gitpod.io/#github.com/graphprotocol/full-stack-graph-app)
Once the setup is complete, the app will be started and you should be able to open it and view it:

### 2. Local Deployment on your Machine
To deploy locally, follow these steps:
1. Clone the project
```sh
git clone git@github.com:graphprotocol/full-stack-graph-app.git
```
2. Change into the __graph-frontend__ directory and install the dependencie:
```sh
cd full-stack-graph-app/graph-frontend
npm install
```
3. Start the server:
```sh
npm run dev
```
4. Optional
If you have an endpoint that you'd like to use, update __.env.local__ with your subgraph endpoint.
### 3. Deploying your own Subgraph
1. Change into the __foundation-subgraph__ directory and install the dependency:
```sh
cd foundation-subgraph
npm install
```
2. Create a new Subgraph in [Subgraph Studio](https://thegraph.com/studio/)
3. Configure your deploy key
```sh
graph auth --studio
```
4. Deploy your subgraph
```sh
graph deploy --studio
```
5. Update the API endpoint environment variable in __graph-frontent/.env.local__