Conversation
|
|
| The engine would send a JSON object with the URL to the current Supergraph build's GraphQL API (when running locally, this would just be a localhost engine URL): | ||
|
|
||
| ```json | ||
| { "supergraphUrl": "https://settling-impala-7722-50bb46e1d5.ddn.hasura.app/graphql" } |
There was a problem hiding this comment.
We need to work out how this would work in the case where there is a custom domain. Engine is only aware of the canonical build urls as custom domains are handled by the gateway. Also, we plan to introduce path based routing for build urls instead of hostname based, and gateway is going to be handling that as well.
A solution could be for the gateway to pass the actual hostname to engine as a separate header and then use that header as SupergraphURL.
There was a problem hiding this comment.
That could work. I think we may need an environment variable setting for it on v3-engine as well, for people self-hosting v3-engine without a gateway injecting headers, or for use when running locally.
Perhaps the env var setting would offer three options:
- Get it from a header from the gateway
- Get it as a value from the env var itself (for self-hosting)
- No env var set (default to localhost)
Rendered Markdown