Gateway request lifecycle

When you send a request to the Grafbase Gateway, it follows these steps:

  1. Call the on-gateway-request hook.
  2. Authenticate the client.
  3. Apply the global rate limit.
  4. Execute the authorization pre-hooks.

Operation plan workflow

After this point, all subgraphs within the request are handled in parallel tasks.

  1. Call the on-subgraph-request hook.
  2. Apply the subgraph rate limit.
  3. Request the subgraph endpoint, with possible retries.

Subgraph request workflow

The main thread waits for all subgraph responses, combines them, and then continues.

  1. Execute the authorization post-hooks.
  2. Send the response to the client.

Response collect workflow

Was this page helpful?