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

rover dev not respecting path configuration in router.yaml #1535

Closed
westhechiang opened this issue Mar 6, 2023 · 1 comment · Fixed by #1539
Closed

rover dev not respecting path configuration in router.yaml #1535

westhechiang opened this issue Mar 6, 2023 · 1 comment · Fixed by #1539
Assignees
Labels

Comments

@westhechiang
Copy link

Description

When using rover dev with --router-config pointed at a router.yaml where path is set to /graphql, the path configuration is ignored and the supergraph endpoint ends up being localhost:3000.

Steps to reproduce

# sample rover dev command
APOLLO_ELV2_LICENSE=accept rover dev --name my-app --schema my-app/schema.gql --url http://localhost:6002/graphql --router-config ./router.local.yaml
# sample router.yaml
supergraph:
  # The path for GraphQL execution
  # (Defaults to /)
  path: /graphql
  listen: 0.0.0.0:3000
  introspection: false
homepage:
  enabled: true
sandbox:
  enabled: false
cors:
  origins:
    - [REDACTED]
  allow_credentials: true
  methods:
    - GET
    - POST
    - OPTIONS
headers:
  all:
    request:
      - propagate:
          named: 'cookie'
      - propagate:
          named: 'host'
          rename: 'X-Forwarded-Host'
      - propagate:
          named: [REDACTED]
  subgraphs:
    my-app:
      request:
        - propagate:
            named: 'x-csrf-token'
telemetry:
  tracing:
    trace_config:
      service_name: 'router'
      service_namespace: 'apollo'
    datadog:
      # localhost: http://host.docker.internal:8126
      # ECS: default
      endpoint: ${env.DATADOG_AGENT_HOST:-default}
rhai:
  scripts: './rhai'

To reproduce, just run rover dev pointed to a router.yaml where path is configured to /graphql and you should see that the supergraph endpoint remains localhost:3000.

Expected result

I would have expected the supergraph's endpoint to be localhost:3000/graphql instead

Actual result

The supergraph endpoint produced by using rover dev remains localhost:3000 intead of localhost:3000/graphql

Environment

Run rover info and paste the results here

Rover Info:
Version: 0.12.2
Install Location: /Users/weschiang/Code/my-company/my-project/node_modules/binary-install/node_modules/.bin/rover
OS: Mac OS 12.6.0 [64-bit]
Shell: /bin/zsh

Apollo Studio Plan - Enterprise
Installation method - npm (yarn)
@westhechiang westhechiang added bug 🐞 triage issues and PRs that need to be triaged labels Mar 6, 2023
@EverlastingBugstopper
Copy link
Contributor

Thanks for the report @westhechiang

@lennyburdette narrowed it down to this line where we stomp on your supergraph properties. I'll take a look at fixing this up.

@EverlastingBugstopper EverlastingBugstopper removed the triage issues and PRs that need to be triaged label Mar 6, 2023
@EverlastingBugstopper EverlastingBugstopper self-assigned this Mar 6, 2023
EverlastingBugstopper added a commit that referenced this issue Mar 9, 2023
This PR fixes the router configuration squashing issue defined in #1535.
EverlastingBugstopper pushed a commit that referenced this issue Mar 10, 2023
…oreply.github.com>

# [0.13.0] - 2023-03-10

## 🚀 Features

- **Dynamic templates - @dbanty, #1388**

Rover now fetches templates from a GraphQL API. New templates can be
contributed to [the templates
repo](https://github.com/apollographql/templates) and will not require a
new release of Rover to be used. To see the latest templates, run `rover
template list`.

## 🐛 Fixes

- **Fixes behavior of `--router-config` in `rover dev` -
@EverlastingBugstopper, #1536 fixes #1535**

Older versions of Rover did not respect the `supergraph` section of the
`--router-config` file. This has been fixed in v0.13.0.

---------

Co-authored-by: Dylan Anthony <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants