rover icon indicating copy to clipboard operation
rover copied to clipboard

Shorthand syntax in router config not supported

Open UpcraftLP opened this issue 3 months ago • 2 comments

Description

As per the router docs, config values can be specified in a shorthand syntax like so:

connectors:
  sources:
    subgraph1.endpoint1:
      # These configurations apply to Connectors with the "endpoint1" source in the "subgraph1" subgraph
      $config:
        my.config.value: true
    subgraph1.endpoint2:
      # These configurations apply to Connectors with the "endpoint2" source in the "subgraph1" subgraph
      $config:
        another.config.value: true # Applies to the "v2" source

This works fine with apollo router, but does not seem to work with rover dev. Instead, rover only accepts those values if they are specified in long form:

connectors:
  sources:
    subgraph1.endpoint1: # strangely doing shorthand *here* is fine?
      $config:
        my:
          config:
            value: true
    subgraph1.endpoint2:
      $config:
        another:
          config:
            value: true

otherwise they are just empty in the request.

Environment

Rover Info: Version: 0.36.0 Install Location: %HOMEPATH%\.rover\bin\rover.exe OS: Windows 10.0.26100 (Windows 11 Enterprise) [64-bit] Shell: Powershell 7.5.3

UpcraftLP avatar Oct 01 '25 14:10 UpcraftLP

The docs are misleading, that's a good callout. to use my.config.value (which is a single key) you'll need to wrap it in quotes in the connect: "{$config.'my.config.value'}"

lennyburdette avatar Oct 01 '25 14:10 lennyburdette

Interesting, because it works just fine without the quotes when using apollo router

UpcraftLP avatar Oct 01 '25 14:10 UpcraftLP