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

Short-form of supergraph.yaml #1634

Closed
dbanty opened this issue Jun 12, 2023 · 1 comment · Fixed by #1666 or #1680
Closed

Short-form of supergraph.yaml #1634

dbanty opened this issue Jun 12, 2023 · 1 comment · Fixed by #1666 or #1680
Labels
feature 🎉 new commands, flags, functionality, and improved error messages triage issues and PRs that need to be triaged

Comments

@dbanty
Copy link
Contributor

dbanty commented Jun 12, 2023

Description

Right now, if you want to introspect subgraphs for supergraph compose or dev --supergraph-config, you need to duplicate the routing URL:

subgraphs:
  products:
    routing_url: http://localhost:4001
    schema:
      subgraph_url: http://localhost:4001

There are certainly cases where you'll want to use separate URLs, but most cases it probably makes sense to assume they are the same. If schema is omitted, we could assume we should attempt introspection at routing_url.

Additionally, when no other config is needed, it might be best to have an even shorter form of this config file that looks something like this:

subgraphs:
  products: http://localhost:4001

This will all require changes over in federation-rs, but they will be used here, so the issue is here.

@dbanty dbanty added feature 🎉 new commands, flags, functionality, and improved error messages triage issues and PRs that need to be triaged labels Jun 12, 2023
@WolffRuoff
Copy link

This behavior wouldn't be usable if the URLs are the same, but there are introspection headers. Maybe an alternative solution would be to have subgraph_url's default value be the routing_url value. That way, if you don't have any headers, it would still be:

subgraphs:
   products:
      routing_url: http://localhost:4001

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 🎉 new commands, flags, functionality, and improved error messages triage issues and PRs that need to be triaged
Projects
None yet
2 participants