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

feat: self-hosted hasura for DataLayer graphql API #23

Merged
merged 5 commits into from
Nov 6, 2024

Conversation

0xnigir1
Copy link
Collaborator

@0xnigir1 0xnigir1 commented Nov 5, 2024

🤖 Linear

Closes GIT-76 GIT-77

Description

  • add a new Hasura service to docker-compose for serving the GraphQL of the data layer

Note: this Hasura is a different service from the one that gets exposed for Envio

Copy link

linear bot commented Nov 5, 2024

HASURA_GRAPHQL_DEV_MODE: ${DATALAYER_HASURA_DEV_MODE:-true}
HASURA_GRAPHQL_ENABLED_LOG_TYPES: "startup, http-log, webhook-log, websocket-log, query-log"
HASURA_GRAPHQL_ENABLED_APIS: "graphql,metrics"
HASURA_GRAPHQL_ADMIN_INTERNAL_ERRORS: "true"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we default this to false? would not want to expose prod info by accident

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right

DATALAYER_HASURA_UNAUTHORIZED_ROLE=public
DATALAYER_HASURA_CORS_DOMAIN=*
DATALAYER_HASURA_ENABLE_TELEMETRY=false
# HASURA_GRAPHQL_METADATA_DATABASE_EXTENSIONS_SCHEMA: "chain_data_schema_1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some explanation of this might be useful--or do you think it would be clear?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i'll add a link to Hasura docs explaining each variable

retries: 5

api-hasura:
image: hasura/graphql-engine:latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure you don't want to pin a version to this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice catch

timeout: 5s
retries: 5

api-hasura:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets pick more descriptive namings here

instead of api-hasura => datalayer-api

instead of graphql-engine => indexer-api

instead of envio-postgres => indexer-db

instead of datalayer-postgres => datalayer-db

lmk wdyt : )

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree on making them more descriptive but i like the tech being on the name

datalayer-graphql-api
indexer-postgres-db

but we can go with your naming too, don't have any particular preference

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets do it in that way :)

@0xnigir1 0xnigir1 requested review from jahabeebs and 0xkenj1 November 6, 2024 19:37
@0xnigir1 0xnigir1 merged commit c55bdd1 into dev Nov 6, 2024
6 checks passed
@0xnigir1 0xnigir1 deleted the feat/hasura-graphql-api branch November 6, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants