Skip to content

Commit

Permalink
Merge pull request #845 from autonomys/main
Browse files Browse the repository at this point in the history
Sync main w/ prod
  • Loading branch information
marc-aurele-besner committed Sep 9, 2024
2 parents 91f23c1 + b088a4c commit a671279
Show file tree
Hide file tree
Showing 412 changed files with 2,816 additions and 87,178 deletions.
7 changes: 5 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
DB_NAME=squid
DB_USER=postgres
DB_PASSWORD=postgres-indexer
DB_PASSWORD=postgres
DB_PORT=5432

DB_CONSENSUS=consensus
DB_LEADERBOARD=leaderboard
DB_STAKING=staking

HASURA_GRAPHQL_ADMIN_SECRET=helloworld
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
DS_Store
*/DS_Store
*/DS_Store

node_modules

# local env files
.env
14 changes: 2 additions & 12 deletions .vscode/astral.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,13 @@
"name": "indexers",
"path": "../indexers"
},
{
"name": "indexer - General Squid",
"path": "../indexers/general-squid"
},
{
"name": "indexer - Account Squid",
"path": "../indexers/account-squid"
},
{
"name": "indexer - Staking Squid",
"path": "../indexers/staking-squid"
},
{
"name": "indexer - Leaderboard Squid",
"path": "../indexers/leaderboard-squid"
},
{
"name": "indexer - Rewards Squid",
"path": "../indexers/rewards-squid"
}
],
"settings": {
Expand All @@ -53,6 +41,8 @@
"cSpell.words": [
"autonomys",
"autoid",
"hasura",
"deregister",
"extrinsics",
"gemini",
"graphiql",
Expand Down
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"cSpell.words": [
"autonomys",
"autoid",
"hasura",
"deregister",
"extrinsics",
"gemini",
"graphiql",
Expand Down
11 changes: 7 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ services:
container_name: explorer-db
image: postgres:14
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
ports:
- "${DB_PORT}:${DB_PORT}"
volumes:
- ./indexers/db/docker-entrypoint-initdb.d/init-db.sql:/docker-entrypoint-initdb.d/init-db.sql

graphql-engine:
container_name: explorer-graphql
Expand All @@ -18,8 +18,11 @@ services:
- "db"
restart: always
environment:
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@db:${DB_PORT}/${DB_NAME}
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@db:${DB_PORT}/${DB_CONSENSUS}
HASURA_GRAPHQL_CONSENSUS_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@db:${DB_PORT}/${DB_CONSENSUS}
HASURA_GRAPHQL_LEADERBOARD_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@db:${DB_PORT}/${DB_LEADERBOARD}
HASURA_GRAPHQL_STAKING_DATABASE_URL: postgres://${DB_USER}:${DB_PASSWORD}@db:${DB_PORT}/${DB_STAKING}
HASURA_GRAPHQL_ENABLE_CONSOLE: "false"
HASURA_GRAPHQL_DEV_MODE: "true"
# HASURA_GRAPHQL_CONSOLE_ASSETS_DIR: /srv/console-assets
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
Expand Down
5 changes: 5 additions & 0 deletions explorer/codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ dotenv.config()

const config: CodegenConfig = {
generates: {
'./gql/types/accounts.ts': {
schema: defaultIndexer.squids.accounts,
documents: ['./src/**/accounts.query.ts'],
plugins: ['typescript', 'typescript-operations'],
},
'./gql/types/leaderboard.ts': {
schema: defaultIndexer.squids.leaderboard,
documents: ['./src/**/leaderboard.query.ts'],
Expand Down
Loading

0 comments on commit a671279

Please sign in to comment.