-
Notifications
You must be signed in to change notification settings - Fork 85
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
Support variable expansion in more places #1578
Comments
Yeah this would be cool, I personally need variable expansion in the URLs as some APIs use search parameters to include API keys. Would also be very useful for CI systems where the URL of the deployment of a subgraph isn't known until after a CI instance is allocated. For example I am deploying a supergrapgh that contains a subgraph that points to my Supabase GraphQL endpoint and another subgraph that points to localhost (which I may want to split into a microservice which may be hosted on a different hostname) which is an Apollo Server that translates GraphQL calls to REST API Calls towards external services. As a developer I wish that both these endpoints be inferred from environment variables as many CI systems make it easier to define process environment variables than other methods. And personally I want my local copy of my .env file to be the single source of truth for configuration of my dev environment across my project(s). |
Our use case for variable expansion is for example
|
It would be nice to have variable in expansion in This could be useful when you have an URL that can change depending on the environment you're running the command. We are currently bypassing this by running a subgraphs:
people:
routing_url: ${env.LB_ADDR}/people/graphql
schema:
subgraph_url: ${env.LB_ADDR}/people/graphql |
…aph.yml. (#1629) Closes #1552, #1578 --------- Co-authored-by: Dylan Anthony <[email protected]>
This should be marked as breaking change - it breaks things when someone already had |
Thanks, @the-ress, I'll update the changelog & release notes. We probably need a way for folks to either disable expansion altogether or escape/ignore certain values. Do you have any suggestions on how this should work? |
Description
Follow-up to #1574 which adds support for router-style variable expansion in
introspection_headers
withinsupergraph.yaml
only. We could support expansion in more places within that file, as well as potentially other config files.The text was updated successfully, but these errors were encountered: