Skip to content

Commit

Permalink
Rename all references to router to Apollo Router (#117)
Browse files Browse the repository at this point in the history
* Rename all references to `router` to `Apollo Router`
Remove `the` in most cases when preceding `Apollo Router`

Co-authored-by: bryn <[email protected]>
Co-authored-by: Jesse Rosenberger <[email protected]>
  • Loading branch information
3 people authored Nov 10, 2021
1 parent 8b915e2 commit d45e422
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 44 deletions.
18 changes: 9 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<img src="https://raw.githubusercontent.com/apollographql/space-kit/main/src/illustrations/svgs/astronaut1.svg" width="100%" height="144">

# Contributing to router
# Contributing to Apollo Router

## Before you contribute!

> The Apollo Federation Router is a project by [Apollo GraphQL] and is not currently ready for
> The Apollo Router is a project by [Apollo GraphQL] and is not currently ready for
> external feature contributors, though some documentation contributions may be
> accepted. We will try to publish a roadmap as soon as possible.
Expand All @@ -14,10 +14,10 @@ That will allow us to figure out a way to solve the issue together, and possibly

## Setting up the project

The Apollo Federation Router is written in [Rust]. In order to contribute, you'll need to have Rust installed. To install Rust,
The Apollo Router is written in [Rust]. In order to contribute, you'll need to have Rust installed. To install Rust,
visit [https://www.rust-lang.org/tools/install].

Rust has a build tool and package manager called [`cargo`] that you'll use to interact with Router's code.
Rust has a build tool and package manager called [`cargo`] that you'll use to interact with the Apollo Router's code.

To build the CLI:

Expand All @@ -29,7 +29,7 @@ To run the CLI:

```bash
cargo run -- <args>
# e.g. 'cargo run -- help' will run the Router help command
# e.g. 'cargo run -- help' will run the Apollo Router's help command
```

Refer to [the README file](README.md) or run `cargo run --help` for more information.
Expand All @@ -41,11 +41,11 @@ Refer to [the README file](README.md) or run `cargo run --help` for more informa

## Project Structure

- `crates/apollo-router`: the web `Apollo Federation Router` sources. This includes everything required to expose the router functionality as a web server, such as serialization / deserialization, configuration management, web server set up, logging configuration etc.
- `crates/apollo-router`: the web `Apollo Router` sources. This includes everything required to expose Apollo Router's functionality as a web server, such as serialization / deserialization, configuration management, web server set up, logging configuration etc.

- `crates/apollo-router/src/main.rs`: the entry point for the executable

- `crates/apollo-router-core`: the `Apollo Federation Router` functionalities. This includes everything required to handle graphql queries:
- `crates/apollo-router-core`: the `Apollo Router` functionalities. This includes everything required to handle graphql queries:
- query plan building
- query plan execution
- subservices fetching mechanism
Expand All @@ -56,7 +56,7 @@ Some of the functionalities rely on the current Javascript / TypeScript implemen

## Documentation

Documentation for using and contributing to Apollo Federation Router is built using Gatsby
Documentation for using and contributing to the Apollo Router is built using Gatsby
and [Apollo's Docs Theme for Gatsby](https://github.com/apollographql/gatsby-theme-apollo/tree/master/packages/gatsby-theme-apollo-docs)
.

Expand Down Expand Up @@ -92,7 +92,7 @@ XTASKs:

- **Tests**: The CI will run `cargo xtask test` which will test each relevant permutation of the available features and run the demo subgraphs.
- **Lints**: The CI will check for lints and clippy compliance.
- **Checks**: The CI will runn cargo-deny to make sure the router doesn't suffer an existing CVE, and that each dependency used by the router is compatible with the router's license.
- **Checks**: The CI will run cargo-deny to make sure the Apollo Router doesn't suffer an existing CVE, and that each dependency used by the Apollo Router is compatible with our license.

After you have opened your PR and all of the status checks are passing, please assign it to one of the maintainers (found in the bottom of [the README](./README.md#contributing) who will review it and give feedback.

Expand Down
8 changes: 4 additions & 4 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Development

Rust implementation of federation router.
The **Apollo Router** is a configurable, high-performance **graph router** for a [federated graph](https://www.apollographql.com/docs/federation/):

## Crates

Expand Down Expand Up @@ -43,7 +43,7 @@ git config --local core.hooksPath .githooks/

Use `cargo build --all-targets` to build the project.

Some tests run against the existing Node.js implementation of the router. This
Some tests run against the existing Node.js implementation of the Apollo Router. This
requires that the `federation-demo` project is running:

* If you have Docker and Docker Compose installed:
Expand All @@ -69,9 +69,9 @@ requires that the `federation-demo` project is running:
npm run start
```
### Run the router against the docker-compose or Node.js setup
### Run Apollo Router against the docker-compose or Node.js setup
Once the subgraphs are up and running, run the router with this command:
Once the subgraphs are up and running, run Apollo Router with this command:
```shell
cargo run -- -s ./examples/local.graphql
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Apollo Federation Router
# Apollo Router

Rust implementation of Federated GraphQL router.
The **Apollo Router** is a configurable, high-performance **graph router** for a [federated graph](https://www.apollographql.com/docs/federation/):

## Getting started

Follow the [quickstart tutorial](https://www.apollographql.com/docs/router/quickstart/) to get up and running with the Apollo Router.

## Status

🚧 Apollo Federation Router is experimental software, not yet ready for production use.
🚧 Apollo Router is experimental software, not yet ready for production use.
It is not yet feature complete nor fully compliant to the GraphQL specification, we are
working on it.
It can already perform queries though, so we'd welcome experiments and feedback on it.

## Usage

Apollo Federation Router requires `configuration.yaml` and `supergraph.graphql`
Apollo Router requires [a supergraph file](https://www.apollographql.com/docs/rover/supergraphs/) to be passed as the `--supergraph` argument and [optional configuration](https://www.apollographql.com/docs/router/configuration/).
to be supplied. These are either located in the current directory or explicitly
specified via flag, either by an absolute path, or a path relative to the current
directory.
Expand Down
2 changes: 1 addition & 1 deletion crates/apollo-router/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ async fn main() -> Result<()> {
ensure!(
opt.supergraph_path.is_some(),
r#"
💫 The router requires a supergraph to be set using '--supergraph':
💫 Apollo Router requires a supergraph to be set using '--supergraph':
$ ./router --supergraph <file>`
Expand Down
10 changes: 5 additions & 5 deletions docs/source/build-from-source.mdx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: Building the Apollo Router from source
title: Building Apollo Router from source
sidebar_title: 🛠 Build from source
---

If the Apollo Router doesn't provide a [prebuilt executable](./quickstart/#1-download-and-extract-the-router-binary) for your system or architecture, you can build the executable from source.
If we don't provide a [prebuilt executable](./quickstart/#1-download-and-extract-the-apollo-router-binary) for your system or architecture, you can build the executable from source.

## 1. Install prerequisites

To compile the Apollo Router binary on your machine, you need the following:
To compile Apollo Router binary on your machine, you need the following:

- **Git.** Github provides a tutorial on [how to install Git](https://github.com/git-guides/install-git).
- **The Rust language.** Head over to [rustup.rs](https://rustup.rs/) to install Rust.
Expand All @@ -26,7 +26,7 @@ git submodule update --init --recursive
## 3. Build and run the executable

From the repository's root directory (`router`), you can run the following command to build and run the Apollo Router:
From the repository's root directory (`router`), you can run the following command to build and run Apollo Router:

```bash
cargo run -- --supergraph ./examples/supergraph.graphql
Expand All @@ -44,4 +44,4 @@ Nov 02 17:08:09.926 INFO router: Starting Apollo Router
Nov 02 17:08:10.279 INFO router: Listening on http://127.0.0.1:4000 🚀
```

That's it! Visit `localhost:4000` to open the [Apollo Studio Explorer](https://www.apollographql.com/docs/studio/explorer/). You can inspect the entire example federated graph and run your first queries against the Apollo Router!
That's it! Visit `localhost:4000` to open the [Apollo Explorer Sandbox](https://www.apollographql.com/docs/studio/explorer/). You can inspect the entire example federated graph and run your first queries against Apollo Router!
8 changes: 4 additions & 4 deletions docs/source/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ sidebar_title: ⚙️ Usage and config

> For installation instructions, see the [quickstart](../quickstart/).
You run the Apollo Router with the following command (assuming you're in the same directory as the `router` executable):
You run Apollo Router with the following command (assuming you're in the same directory as the `router` executable):

```bash
./router --config configuration.yaml --supergraph supergraph-schema.graphql
Expand Down Expand Up @@ -63,9 +63,9 @@ You can also provide this value via the `CONFIGURATION_PATH` environment variabl

## Handling CORS

If you attempt to query the Apollo Router from a browser-based client, your request might be rejected due to CORS policies.
If you attempt to query Apollo Router from a browser-based client, your request might be rejected due to CORS policies.

You can configure CORS in the [YAML configuration file](#configuration-file) you can provide to the Apollo Router.
You can configure CORS in the [YAML configuration file](#configuration-file) you can provide to Apollo Router.

Here's an example configuration for adding `localhost` to the list of approved origins:

Expand All @@ -81,7 +81,7 @@ server:
## Configuration file
The Apollo Router takes an optional YAML configuration file as input via the `--config` option. All supported configuration options are listed below:
Apollo Router takes an optional YAML configuration file as input via the `--config` option. All supported configuration options are listed below:

```yaml:title=configuration.yaml
# Configuration of the router's HTTP server
Expand Down
26 changes: 13 additions & 13 deletions docs/source/quickstart.mdx
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
---
title: Apollo Router quickstart
sidebar_title: 🚀 Quickstart
description: Run the Router with Apollo-hosted subgraphs
description: Run the Apollo Router with Apollo-hosted subgraphs
---

import { ExpansionPanel } from "gatsby-theme-apollo-docs";

Hello! This tutorial walks you through installing the Apollo Router and running it in front of some Apollo-hosted example subgraphs.
Hello! This tutorial walks you through installing Apollo Router and running it in front of some Apollo-hosted example subgraphs.

## 1. Download and extract the router binary
## 1. Download and extract the Apollo Router binary

Go to the Apollo Router's [GitHub Releases page](https://github.com/apollographql/router/releases) and download the latest `.tar.gz` file that matches your system. Currently, tarballs are available for the following:

* Linux (x86_64)
* macOS (x86_64)
* Windows (x86_64)

> If a tarball for your system or architecture isn't available, you can [build and run the Apollo Router from source](./build-from-source/).
> If a tarball for your system or architecture isn't available, you can [build and run Apollo Router from source](./build-from-source/).
After downloading, extract the file by running the following from a new project directory, substituting the path to the tarball:

```bash
tar -xf path/to/file.tar.gz
```

You can now try running the Apollo Router from your project's root directory with the following command:
You can now try running Apollo Router from your project's root directory with the following command:

```bash
./dist/router
Expand All @@ -34,7 +34,7 @@ If you do, you'll get the following error:

```
Error:
💫 The router requires a supergraph to be set using '--supergraph':
💫 Apollo Router requires a supergraph to be set using '--supergraph':
$ ./router --supergraph <file>`
Expand All @@ -48,12 +48,12 @@ Error:
$ curl -L https://supergraph.demo.starstuff.dev/ > starstuff.graphql
Then run the Apollo Router with that supergraph:
Then run Apollo Router with that supergraph:
$ ./router --supergraph starstuff.graphql
```

This is because the Router requires a supergraph schema as input! Let's obtain one.
This is because Apollo Router requires a supergraph schema as input! Let's obtain one.

## 2. Download the example supergraph schema

Expand Down Expand Up @@ -147,9 +147,9 @@ type User

</ExpansionPanel>

This file is all that the Apollo Router needs to communicate with our subgraphs!
This file is all that Apollo Router needs to communicate with our subgraphs!

## 3. Run the Router with the default configuration
## 3. Run Apollo Router with the default configuration

Now from your project root, run the following:

Expand All @@ -164,11 +164,11 @@ Nov 02 17:08:09.926 INFO router: Starting Apollo Router
Nov 02 17:08:10.279 INFO router: Listening on http://127.0.0.1:4000 🚀
```

That's it! Visit `localhost:4000` to open the [Apollo Studio Explorer](https://www.apollographql.com/docs/studio/explorer/). You can inspect the entire federated graph and run your first queries against the Apollo Router!
That's it! Visit `localhost:4000` to open the [Apollo Sandbox Explorer](https://www.apollographql.com/docs/studio/explorer/). You can inspect the entire federated graph and run your first queries against Apollo Router!

## Next steps

Now that you know how to run the Apollo Router with a supergraph schema, you can:
Now that you know how to run Apollo Router with a supergraph schema, you can:

* Try running the Router in front of test instances of your own subgraphs
* Try running Apollo Router in front of test instances of your own subgraphs
* Learn about [advanced configuration options](./configuration/)
8 changes: 4 additions & 4 deletions xtask/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# xtask

Router uses [xtask](https://github.com/matklad/cargo-xtask) to help with the automation of code quality.
The Apollo Router project uses [xtask](https://github.com/matklad/cargo-xtask) to help with the automation of code quality.

You can run `cargo xtask --help` to see the usage. Generally we recommend that you continue to use the default cargo commands like `cargo fmt`, `cargo clippy`, and `cargo test`, but if you are debugging something that is happening in CI it can be useful to run the xtask commands that we run [in CI](../.github/workflows).

Expand All @@ -10,10 +10,10 @@ You can run `cargo xtask test` to run tests with the same configuration as our C

## xtask dist

You can run `cargo xtask dist` to build Router's binary like it would be built in CI. It will automatically build from the source that you've checked out and for your local machine's architecture. If you would like to build a specific version of Router, you can pass `--version v0.1.5` where `v0.1.5` is the version you'd like to build.
You can run `cargo xtask dist` to build the Apollo Router's binary like it would be built in CI. It will automatically build from the source that you've checked out and for your local machine's architecture. If you would like to build a specific version of Router, you can pass `--version v0.1.5` where `v0.1.5` is the version you'd like to build.

## xtask prep

The most important xtask command you'll need to run locally is `cargo xtask prep`. This command prepares Router for a new release. You'll want to update the version in `Cargo.toml`, and run `cargo xtask prep` as a part of making the PR for a new release.
The most important xtask command you'll need to run locally is `cargo xtask prep`. This command prepares the Apollo Router for a new release. You'll want to update the version in `Cargo.toml`, and run `cargo xtask prep` as a part of making the PR for a new release.

These steps are outlined in more detail in the [release checklist](../RELEASE_CHECKLIST.md).
These steps are outlined in more detail in the [release checklist](../RELEASE_CHECKLIST.md).

0 comments on commit d45e422

Please sign in to comment.