> For the complete documentation index, see [llms.txt](https://docs.algebra.finance/algebra-integral-documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.algebra.finance/algebra-integral-documentation/algebra-v1-technical-reference/subgraph/subgraph-setup/subgraph-deployment.md).

# Subgraph Deployment

Algebra Protocol has 3 Subgraphs:

* Algebra
* AlgebraFarming
* Blocklytics (polygonBlocks)

For each directory you need to run the same proccess:

```
$ yarn
$ yarn codegen
$ yarn build 
```

#### Deploy

For deploy you need to run:

```
$ yarn graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token <access-token> <graph-name> subgraph.yaml
```

### AlgebraFarming

Before building you need to make a few changes:

Update FarmingCenterAddress in AlgebraFarming/src/utils/constants.ts Update network, startBlock and addresses in subgraph.yaml

After that you need to run:

```
$ yarn
$ yarn codegen
$ yarn build 
```

#### Deploy

For deploy you need to run:

```
$ yarn graph deploy --node https://api.thegraph.com/deploy/ --ipfs https://api.thegraph.com/ipfs/ --access-token <access-token> <graph-name> subgraph.yaml
```
