Skip to content

Adds support for .env file for use with rover dev #2646

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

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

DMallare
Copy link

@DMallare DMallare commented Jul 8, 2025

  • Adds .env support for rover dev command
  • Uses the values in the .env file if present
  • If APOLLO_GRAPH_REF and/or APOLLO_KEY are supplied inline with the command those values override what is defined in .env

Manual Testing

Scenario 1: Using .env file containing valid APOLLO_KEY and APOLLO_GRAPH_REF

  1. Run rover config whoami to ensure we are using the correct API key
dmallare@Mac test-rover-init % ./rover-test config whoami
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘
  1. Run rover dev with the .env file
dmallare@Mac test-rover-init % ./rover-test dev --supergraph-config supergraph.yaml
merging supergraph schema files
supergraph config loaded successfully
By installing this plugin, you accept the terms and conditions outlined by this license.
More information on the ELv2 license can be found here: https://go.apollo.dev/elv2.
Do you accept the terms and conditions of the ELv2 license? [y/N]
y
starting a session with the 'products' subgraph
==> Watching /Users/dmallare/test-rover-init/products.graphql for changes
composing supergraph with Federation 2.10.0
==> Attempting to start router at http://localhost:4000.
==> Health check exposed at http://127.0.0.1:8088/health
WARN: Connector debugging is enabled, this may expose sensitive information.
==> Your supergraph is running! head to http://localhost:4000 to query your supergraph
  1. Check that rover config whoami has not changed
dmallare@Mac test-rover-init % ./rover-test config whoami  
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘

Scenario 2: Using .env file containing invalid APOLLO_KEY and valid APOLLO_GRAPH_REF

  1. Run rover config whoami to ensure we are using the correct API key
dmallare@Mac test-rover-init % ./rover-test config whoami
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘
  1. Run rover dev with the .env file containing an invalid APOLLO_KEY
dmallare@Mac test-rover-init % ./rover-test dev --supergraph-config supergraph.yaml
merging supergraph schema files
supergraph config loaded successfully
starting a session with the 'products' subgraph
==> Watching /Users/dmallare/test-rover-init/products.graphql for changes
composing supergraph with Federation 2.10.0
==> Attempting to start router at http://localhost:4000.
ERROR: uplink error, the request will not be retried: code=ACCESS_DENIED message=API key service:ellie-test-rest2-99y76u2:●●●●●●●●●●●●●●●●jlsW cannot access Uplink for the 'ellie-test-rest2-99y76u2' graph.
 Please verify that the graph exists and that the API key in question has Observer access or higher.
ERROR: no valid license was supplied
ERROR: no valid license was supplied
Router process exited with status code: 1

Router binary exited, stopping `rover dev` processes...
  1. Check that rover config whoami has not changed
dmallare@Mac test-rover-init % ./rover-test config whoami  
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘

Scenario 3: Using .env file containing valid APOLLO_KEY and invalid APOLLO_GRAPH_REF

  1. Run rover config whoami to ensure we are using the correct API key
dmallare@Mac test-rover-init % ./rover-test config whoami
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘
  1. Run rover dev with the .env file containing an invalid APOLLO_GRAPH_REF
dmallare@Mac test-rover-init % ./rover-test dev --supergraph-config supergraph.yaml
merging supergraph schema files
supergraph config loaded successfully
starting a session with the 'products' subgraph
==> Watching /Users/dmallare/test-rover-init/products.graphql for changes
composing supergraph with Federation 2.10.0
==> Attempting to start router at http://localhost:4000.
ERROR: uplink error, the request will not be retried: code=ACCESS_DENIED message=API key service:ellie-test-rest2-99y76u2:●●●●●●●●●●●●●●●●●●sW5A cannot access Uplink for the 'wrong' graph.
 Please verify that the graph exists and that the API key in question has Observer access or higher.
ERROR: no valid license was supplied
ERROR: no valid license was supplied
Router process exited with status code: 1

Router binary exited, stopping `rover dev` processes...
  1. Check that rover config whoami has not changed
dmallare@Mac test-rover-init % ./rover-test config whoami  
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘

Scenario 4: Using an empty .env file

  1. Run rover config whoami to ensure we are using the correct API key
dmallare@Mac test-rover-init % ./rover-test config whoami
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘
  1. Run rover dev with empty .env file
dmallare@Mac test-rover-init % ./rover-test dev --supergraph-config supergraph.yaml
merging supergraph schema files
supergraph config loaded successfully
starting a session with the 'products' subgraph
==> Watching /Users/dmallare/test-rover-init/products.graphql for changes
composing supergraph with Federation 2.10.0
==> Attempting to start router at http://localhost:4000.
ERROR: Not connected to GraphOS. In order to enable these features for a self-hosted instance of Apollo Router, the Router must be connected to a graph in GraphOS (using APOLLO_KEY and APOLLO_GRAPH_REF) that provides a license for the following features:

Schema features:
* @connect
  https://specs.apollo.dev/connect/v0.1

See https://go.apollo.dev/o/elp for more information.
ERROR: license violation
ERROR: license violation
Router process exited with status code: 1

Router binary exited, stopping `rover dev` processes...
  1. Check that rover config whoami has not changed
dmallare@Mac test-rover-init % ./rover-test config whoami  
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘

Scenario 5: Supplying APOLLO_GRAPH_REF and APOLLO_KEY inline with the command and no .env file

  1. Run rover config whoami to ensure we are using the correct API key
dmallare@Mac test-rover-init % ./rover-test config whoami
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘
  1. Run rover dev with variables
dmallare@Mac test-rover-init % APOLLO_KEY=<key> APOLLO_GRAPH_REF=ellie-test-rest2-99y76u2@current ./rover-test dev --supergraph-config supergraph.yaml
merging supergraph schema files
supergraph config loaded successfully
starting a session with the 'products' subgraph
==> Watching /Users/dmallare/test-rover-init/products.graphql for changes
composing supergraph with Federation 2.10.0
==> Attempting to start router at http://localhost:4000.
==> Health check exposed at http://127.0.0.1:8088/health
WARN: Connector debugging is enabled, this may expose sensitive information.
==> Your supergraph is running! head to http://localhost:4000 to query your supergraph
  1. Check that rover config whoami has not changed
dmallare@Mac test-rover-init % ./rover-test config whoami  
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘

Scenario 6: Supplying APOLLO_GRAPH_REF and APOLLO_KEY inline with the command and .env file containing an invalid APOLLO_KEY

  1. Run rover config whoami to ensure we are using the correct API key
dmallare@Mac test-rover-init % ./rover-test config whoami
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘
  1. Run rover dev
dmallare@Mac test-rover-init % APOLLO_KEY=<key> APOLLO_GRAPH_REF=ellie-test-rest2-99y76u2@current ./rover-test dev --supergraph-config supergraph.yaml
merging supergraph schema files
supergraph config loaded successfully
starting a session with the 'products' subgraph
==> Watching /Users/dmallare/test-rover-init/products.graphql for changes
composing supergraph with Federation 2.10.0
==> Attempting to start router at http://localhost:4000.
==> Health check exposed at http://127.0.0.1:8088/health
WARN: Connector debugging is enabled, this may expose sensitive information.
==> Your supergraph is running! head to http://localhost:4000 to query your supergraph
  1. Check that rover config whoami has not changed
dmallare@Mac test-rover-init % ./rover-test config whoami  
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘

Scenario 7: Supplying APOLLO_GRAPH_REF and APOLLO_KEY inline with the command and .env file containing an invalid APOLLO_GRAPH_REF

  1. Run rover config whoami to ensure we are using the correct API key
dmallare@Mac test-rover-init % ./rover-test config whoami
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘
  1. Run rover dev
dmallare@Mac test-rover-init % APOLLO_KEY=<key> APOLLO_GRAPH_REF=ellie-test-rest2-99y76u2@current ./rover-test dev --supergraph-config supergraph.yaml
merging supergraph schema files
supergraph config loaded successfully
starting a session with the 'products' subgraph
==> Watching /Users/dmallare/test-rover-init/products.graphql for changes
composing supergraph with Federation 2.10.0
==> Attempting to start router at http://localhost:4000.
==> Health check exposed at http://127.0.0.1:8088/health
WARN: Connector debugging is enabled, this may expose sensitive information.
==> Your supergraph is running! head to http://localhost:4000 to query your supergraph
  1. Check that rover config whoami has not changed
dmallare@Mac test-rover-init % ./rover-test config whoami  
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘

Scenario 8: Supplying APOLLO_KEY inline with the command and .env file containing an invalid APOLLO_GRAPH_REF

  1. Run rover config whoami to ensure we are using the correct API key
dmallare@Mac test-rover-init % ./rover-test config whoami
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘
  1. Run rover dev
dmallare@Mac test-rover-init % APOLLO_KEY=<key> ./rover-test dev --supergraph-config supergraph.yaml
merging supergraph schema files
supergraph config loaded successfully
starting a session with the 'products' subgraph
==> Watching /Users/dmallare/test-rover-init/products.graphql for changes
composing supergraph with Federation 2.10.0
==> Attempting to start router at http://localhost:4000.
ERROR: uplink error, the request will not be retried: code=ACCESS_DENIED message=API key service:ellie-test-rest2-99y76u2:●●●●●●●●●●●●●●●●●●sW5A cannot access Uplink for the 'wrong' graph.
 Please verify that the graph exists and that the API key in question has Observer access or higher.
ERROR: no valid license was supplied
ERROR: no valid license was supplied
Router process exited with status code: 1

Router binary exited, stopping `rover dev` processes...
  1. Check that rover config whoami has not changed
dmallare@Mac test-rover-init % ./rover-test config whoami  
Checking identity of your API key against the registry.
┌──────────┬─────────────────────────────────────────────────────────────────────┐
│ Key Type ┆ User                                                                │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ User ID  ┆ fp.9b8ad486-bc00-4ce7-bfd8-54cce87eb1a8                             │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ Origin   ┆ --profile default                                                   │
├╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤
│ API Key  ┆ user***********************************************************JgJg │
└──────────┴─────────────────────────────────────────────────────────────────────┘

@apollo-cla
Copy link

@DMallare: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

@apollo-librarian
Copy link
Contributor

apollo-librarian bot commented Jul 8, 2025

⚠️ Docs preview not attached to branch

The preview was not built because the PR's base branch release-0.35.0-beta is not in the list of sources.

An Apollo team member can comment one of the following commands to dictate which branch to attach the preview to:

  • !docs set-base-branch main

Build ID: daa6448e22595487673bab7c

@DMallare DMallare force-pushed the dmallare/add-env-file-support branch 2 times, most recently from 331ce84 to 9a9c952 Compare July 8, 2025 21:49
@DMallare DMallare force-pushed the dmallare/add-env-file-support branch from 9a9c952 to 496b60f Compare July 8, 2025 21:56
@DMallare DMallare marked this pull request as ready for review July 9, 2025 18:06
@DMallare DMallare requested review from a team as code owners July 9, 2025 18:06
@DMallare DMallare merged commit e67b6e0 into release-0.35.0-beta Jul 9, 2025
32 checks passed
@DMallare DMallare deleted the dmallare/add-env-file-support branch July 9, 2025 18:40
@DaleSeo DaleSeo added this to the v0.35.0 milestone Jul 30, 2025
@DaleSeo DaleSeo added the feature 🎉 new commands, flags, functionality, and improved error messages label Jul 30, 2025
@DaleSeo DaleSeo mentioned this pull request Jul 30, 2025
DaleSeo added a commit that referenced this pull request Jul 30, 2025
# [0.35.0] - 2025-07-30

## ❗ BREAKING ❗

- **use config file for MCP server - @nicholascioli PR #2665**

## 🚀 Features

- **Update MCP options for rover dev - @DaleSeo PR #2661**
- **Add schema name step to Connectors init workflow - @alyssahursh PR
#2647**
- **Allow running rover dev without --supergraph-config if you have a
rover.yaml in the current directory - @dylan-apollo PR #2650**
- **Updating output for init & renaming generated "supergraph.yaml" ->
"rover.yaml" - @tayrrible PR #2651**
- **Adds support for .env file for use with rover dev - @DMallare PR
#2646**
- **Add graph_ref to and remove federation_version from subgraph.yaml -
@alyssahursh PR #2649**
- **Hackathon improvements to supergraph.yaml - @dylan-apollo PR #2648**
- **Adding link to studio for graph & showing each step in creation
process via spinners - @tayrrible PR #2657**
- **Generates .env file with rover init - @DMallare PR #2652**
- **Remove use case guard clause in schema name prompt - @alyssahursh PR
#2655**
- **Set APOLLO_GRAPH_REF from rover.yaml's graph_ref - @dylan-apollo PR
#2653**
- **Adding apollo.config.yaml file for connectors projects - @tayrrible
PR #2658**
- **add a note about the need for APOLLO_KEY and APOLLO_GRAPH_REF when
using router features or connect - @the-gigi-apollo PR #2677**
- **Update Studio Client after loading .env in rover dev - @dylan-apollo
PR #2654**
- **Exposing org selector for all runs of init and changing prompt order
- @tayrrible PR #2656**


## 🛠 Maintenance

- **upgrade schemars and apollo-federation-types - @DaleSeo PR #2676**
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants