Gateway request lifecycle
When you send a request to the Grafbase Gateway, it follows these steps:
- Call the on-gateway-request hook.
- Authenticate the client.
- Apply the global rate limit.
- Execute the authorization pre-hooks.
After this point, all subgraphs within the request are handled in parallel tasks.
- Call the on-subgraph-request hook.
- Apply the subgraph rate limit.
- Request the subgraph endpoint, with possible retries.
The main thread waits for all subgraph responses, combines them, and then continues.
- Execute the authorization post-hooks.
- Send the response to the client.