From c29c46566c3a5a9f6219f6e8c4c11249b3885d9a Mon Sep 17 00:00:00 2001 From: meskill <8974488+meskill@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:50:23 +0000 Subject: [PATCH] add introduction doc to runtime configuration --- docs/runtime-config.md | 52 ++++++++++++++++++++++++++++++++++++++++++ sidebars.ts | 4 ++-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 docs/runtime-config.md diff --git a/docs/runtime-config.md b/docs/runtime-config.md new file mode 100644 index 000000000..e5afb75a3 --- /dev/null +++ b/docs/runtime-config.md @@ -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. | diff --git a/sidebars.ts b/sidebars.ts index 8d309bc4b..c2ca82ab8 100644 --- a/sidebars.ts +++ b/sidebars.ts @@ -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",