Run
cp env.local .env
For the sanity content to work, you need to set
the SANITY_API_TOKEN
.
There are 2 kinds of graphql types to generate. We have types for interacting with the different subgraphs, and the types
for our exposed graphql api schema.
Run yarn generate
to generate all gql types
First we need to spin up the database, there is a docker-compose
file with a postgres
database configured. Spin it up by running docker-compose up -d
.
Run yarn prisma migrate dev
to apply all database migrations.
Run yarn prisma generate
to generate the prisma client. Usually this is already
done by applying the migrations
Trigger the following mutations when you start from a clean DB:
poolSyncAllPoolsFromSubgraph
poolReloadStakingForAllPools
userInitWalletBalancesForAllPools
userInitStakedBalances
We run a canary and a production (called main) deployment environment.
The canary environment is built from the v2-canary
branch and the production deployment
is built from the v2-main
branch. The environments can be accessed through the following links:
https://backend-v2.beets-ftm-node.com/graphql
https://backend-v2-canary.beets-ftm-node.com/graphql
https://backend-optimism-v2.beets-ftm-node.com/graphql
https://backend-optimism-v2-canary.beets-ftm-node.com/graphql
We follow the model of gitflow using the following naming for branches:
- main: v2-main
- development: v2-canary
- feature: feature/*
- release: release/*
- hotfix: hf/*
To contribute, branch from v2-canary
(which is our development branch) and open a PR against v2-canary
once the feature is complete. It will be reviewed and eventually merged into v2-canary.