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

Subgraph: Integrate with dApp #347

Closed
Tracked by #114
nkuba opened this issue Apr 10, 2024 · 0 comments · Fixed by #397
Closed
Tracked by #114

Subgraph: Integrate with dApp #347

nkuba opened this issue Apr 10, 2024 · 0 comments · Fixed by #397
Assignees

Comments

@nkuba
Copy link
Member

nkuba commented Apr 10, 2024

Integrate dApp with subgraph to obtain required data.

@nkuba nkuba mentioned this issue Apr 10, 2024
r-czajkowski added a commit that referenced this issue May 9, 2024
Closes #347

This PR integrates a subgraph with dApp. Subgraph can be run locally or
use a production/development URL. To select the right endpoint, set the
URL for the following environmental variable:

```
VITE_ACRE_SUBGRAPH_URL=<SUBGRAPH_URL>
```

By default, the development URL is set to subgraph.

- If you want to use a local subgraph you need to follow the steps
[here](https://github.com/thesis/acre/blob/main/subgraph/README.md).
Then set the subgraph URL to localhost.
- To find the production URL you need to connect to the [Subgraph
Studio](https://thegraph.com/studio/) with Acre Wallet and open the
dedicated page for the selected subgraph. Copy the URL and use the API
key from the "API Keys" tab.

### Subgraph API

- `fetchActivityDatas` - Returns activities for the Ethereum account
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants