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

Supergraph Client RFC #10311

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

daniel-chambers
Copy link
Contributor

@daniel-chambers daniel-chambers commented Jun 24, 2024

@daniel-chambers daniel-chambers requested a review from a team as a code owner June 24, 2024 23:38
@daniel-chambers daniel-chambers self-assigned this Jun 24, 2024
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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" }
Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

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)

@manasag
Copy link
Contributor

manasag commented Sep 26, 2024

#10247

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.

4 participants