cosmo icon indicating copy to clipboard operation
cosmo copied to clipboard

request: static configuration to reference subgraphs by name rather than index

Open flymedllva opened this issue 1 year ago • 7 comments

Component(s)

router

Is your feature request related to a problem? Please describe.

I use wgc to build the schematic locally and I get Failed to fetch from subgraph '7' at path 'query'., it is not clear what this subgraph is.

Describe the solution you'd like

I would like to be able to see the name of the subgraph in the bug despite the fact that it reveals information about the services under the router.

Describe alternatives you've considered

No response

Additional context

No response

flymedllva avatar Apr 03 '24 09:04 flymedllva

WunderGraph commits fully to Open Source and we want to make sure that we can help you as fast as possible. The roadmap is driven by our customers and we have to prioritize issues that are important to them. You can influence the priority by becoming a customer. Please contact us here.

github-actions[bot] avatar Apr 03 '24 09:04 github-actions[bot]

Please can you attach your .yml that you're passing to wgc router compose?

Aenimus avatar Apr 03 '24 14:04 Aenimus

it numbers all the listed services, I would like to see the name in the error, not the number.

version: 1
subgraphs:
  - name: test
    routing_url: http://localhost:8080/query
    introspection:
      url: http://localhost:8080/query

flymedllva avatar Apr 03 '24 14:04 flymedllva

For example see screens from https://github.com/wundergraph/cosmo/issues/684

I would like to see the name of the graph "test" in the error, not "0".

flymedllva avatar Apr 03 '24 15:04 flymedllva

For the error you've posted here, you have >=8 subgraphs, correct?

And the issue is that subgraph provides the index, rather than the name?

Aenimus avatar Apr 03 '24 17:04 Aenimus

When using a static config, indices are used. See also: https://github.com/wundergraph/cosmo/issues/364

We'd welcome a PR that addresses this, but changing it is not a priority.

Aenimus avatar Apr 03 '24 18:04 Aenimus

For the error you've posted here, you have >=8 subgraphs, correct?

And the issue is that subgraph provides the index, rather than the name?

Yes, more than 25 subgraphs so far.

When using a static config, indices are used. See also: https://github.com/wundergraph/cosmo/issues/364

We'd welcome a PR that addresses this, but changing it is not a priority.

Yeah in trace would be cool to see the name too!

Thx

flymedllva avatar Apr 04 '24 04:04 flymedllva