Skip to content

Commit

Permalink
add introduction doc to runtime configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
meskill committed Dec 17, 2024
1 parent 632f8ce commit c29c465
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
52 changes: 52 additions & 0 deletions docs/runtime-config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
title: "Getting Started"
description: Detailed guide on the runtime configuration for Tailcall.
slug: runtime-configuration
---

The runtime configuration in Tailcall is designed to handle all runtime-related settings, such as server settings, upstream configurations, telemetry, and links to other resources. This configuration is written exclusively in `.json` or `.yml` format.

## Introduction

The runtime configuration separates runtime concerns from schema definitions, simplifying the management and merging of configurations. This approach ensures a clear distinction between runtime settings and schema definitions, making the configuration process more predictable and easier to manage.

## Configuration Structure

A typical runtime configuration file includes settings for the server, upstream services, telemetry, and links to other resources. Below is an example of a runtime configuration in YAML format:

```yaml title="main.yaml" showLineNumbers
server:
port: 8000

upstream:
batch:
maxSize: 1000

telemetry:
export:
stdout:
pretty: true

links:
- src: "./users.graphql"
- src: "./products.graphql"
```
## Example Usage
To start the Tailcall server with the runtime configuration, use the following command:
```sh
tailcall start ./main.yaml
```

This command will start the server using the settings defined in main.yml.

## Configuration Options

| Option | Description |
| ------------------------------------ | ----------------------------------------------------------------------------- |
| [`server`](./config/server.md) | Configuration settings for the Tailcall server, including port and host. |
| [`upstream`](./config/upstream.md) | Settings for upstream services, such as batching and timeouts. |
| [`telemetry`](./config/telemetry.md) | Configuration for telemetry export options, including format and endpoints. |
| [`links`](./config/links.md) | Links to other resources or schema files to be included in the configuration. |
4 changes: 2 additions & 2 deletions sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const sidebars: SidebarsConfig = {
},
{
type: "category",
label: "Config",
label: "Runtime configuration",
collapsed: false,
items: ["config/links", "config/server", "config/telemetry", "config/upstream"].sort(),
items: ["runtime-config", "config/links", "config/server", "config/telemetry", "config/upstream"],
},
{
type: "category",
Expand Down

0 comments on commit c29c465

Please sign in to comment.