Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add secret documentation in config generation #442

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ To generate a TailCall GraphQL configuration, provide a configuration file to th

```json
{
"secret": "API_KEY",
"inputs": [
{
"curl": {
Expand Down Expand Up @@ -174,6 +175,7 @@ To generate a TailCall GraphQL configuration, provide a configuration file to th
<TabItem value="yml" label="YML">

```yaml
secret: "API_KEY"
inputs:
- curl:
src: "https://jsonplaceholder.typicode.com/posts/1"
Expand Down Expand Up @@ -588,3 +590,11 @@ preset:
```

By leveraging field names to derive type names, the schema becomes more intuitive and aligned with the data it represents, enhancing overall readability and understanding.

### Secret

The `secret` section in the configuration allows you to provide an API key which is then used by the AI agent, for enhancing GraphQL schema. Tailcall leverages the power of AI agents for improving the quality of configuration files by suggesting better names for types and fields etc.

:::info
Ensure that secrets are not stored directly in the configuration file. Instead, use templates to securely reference secrets from environment variables. For example, you can write secret as `{{.env.TAILCALL_SECRET}}`, where TAILCALL_SECRET is referenced from the running environment.
:::
Loading