Skip to content

Commit

Permalink
[docs] Update rhai docs to include Router service (#4325)
Browse files Browse the repository at this point in the history
As of 1.30.0, Rhai can now access RouterService

---------

Co-authored-by: Edward Huang <[email protected]>
  • Loading branch information
smyrick and shorgi authored Dec 12, 2023
1 parent 09be55d commit 5ea218b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/source/customizations/rhai.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ sequenceDiagram

As execution proceeds "left to right" from the `RouterService` to individual `SubgraphService`s, each service passes the client's original request along to the _next_ service. Similarly, as execution continues "right to left" from `SubgraphService`s to the `RouterService`, each service passes the generated response for the client.

Your Rhai scripts can hook into any combination of the above services _except_ the `RouterService` (which is reserved for built-in features). They can modify the request, response, and/or related metadata as they're passed along.
Your Rhai scripts can hook into any combination of the above services (if you are using the Apollo Router v1.30.0 and later). The scripts can modify the request, response, and/or related metadata as they're passed along.

### Service descriptions

Each Apollo Router service (except `RouterService`) has a corresponding function that a Rhai script can define to hook into that service:
Each Apollo Router service has a corresponding function that a Rhai script can define to hook into that service:

<table class="field-table">
<thead>
Expand All @@ -190,7 +190,7 @@ Each Apollo Router service (except `RouterService`) has a corresponding function
</td>
<td>

**Reserved for built-in functionality.** Runs at the very beginning and very end of the HTTP request lifecycle.
Runs at the very beginning and very end of the HTTP request lifecycle.

For example, [JWT authentication](../configuration/authn-jwt) is performed within the `RouterService`.

Expand Down

0 comments on commit 5ea218b

Please sign in to comment.