hasura / hasura/graphql-engine
server: allow customizing BigQuery endpoint
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Is your proposal related to a problem?
There is some BigQuery emulator library, e.g https://github.com/goccy/bigquery-emulator. The client can connect with the emulator with a custom endpoint, e.g http://0.0.0.0:9050. It's useful for local development and testing.
### Describe the solution you'd like
Add an env variable named `HASURA_GRAPHQL_BIGQUERY_SERVICE_ENDPOINT`. The default value is `https://bigquery.googleapis.com`. This variable is global that takes effect on all BigQuery data sources.
https://github.com/hasura/graphql-engine/blob/54546fcc6bc4f6f56fc77d1502d5390f9efc3616/server/src-lib/Hasura/Backends/BigQuery/Execute.hs#L240
### Describe alternatives you've considered
We can allow this setting to individual data sources. It's more flexible but IMO it isn't necessary. Moreover it also takes more efforts for the console team
### If the feature is approved, would you be willing to submit a PR?
Yes, if I have time to do it.
Contributor guide
Research direction
Start with server/src-lib/Hasura/Backends/BigQuery/Execute.hs around line 240, then trace how global environment settings are parsed and passed to BigQuery data sources. Verify the endpoint defaults to https://bigquery.googleapis.com and can be overridden by HASURA_GRAPHQL_BIGQUERY_SERVICE_ENDPOINT for emulator use across all BigQuery sources.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100