Skip to content

Commit

Permalink
Merge branch 'develop' into mustache-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
tusharmath authored Feb 28, 2024
2 parents 6fd26e7 + f9818f2 commit e80af05
Show file tree
Hide file tree
Showing 89 changed files with 3,956 additions and 4,108 deletions.
17 changes: 17 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parser": "@babel/eslint-parser",
"parserOptions": {
"ecmaVersion": 2021,
"sourceType": "module",
"requireConfigFile": false
},
"extends": ["plugin:@docusaurus/recommended", "plugin:@typescript-eslint/recommended"],
"plugins": ["@docusaurus", "@typescript-eslint"],
"rules": {
"@docusaurus/string-literal-i18n-messages": "error",
"@docusaurus/no-html-links": "error",
"@typescript-eslint/no-explicit-any": ["error", {"ignoreRestArgs": true}]
// Add other TypeScript rules as needed
},
"ignorePatterns": ["node_modules/", "build/"]
}
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/write-a-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
name: Write a Guide
about: Template to write guides
title: "doc: "
labels: ""
assignees: ""
---

<!-- Describe the requirements here -->

## Content Creation Requirements

To maintain the quality of our content, please adhere to the following guidelines:

### 1. Accuracy in Language

- **Grammar and Spelling:** Ensure your content is free from grammatical and spelling errors.

### 2. Tone and Style

- **Neutral Tone:** Maintain a neutral, non-emotional tone throughout the content.
- **Engaging Style:** Write in a free-flowing and engaging manner, keeping the reader's interest.

### 3. Content Integrity

- **Fact-Checking:** Verify all information. If unsure, use Discord to clarify.
- **Relevance:** Ensure all content is cohesive, to the point, and directly related to the title.

### 4. Originality

- **Avoid Low-Effort Content:** Content should be original and not solely generated by AI tools like ChatGPT.

**PS: Adherence to these guidelines is crucial. Content not meeting these standards may require revision or may not be accepted.**
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
run: |
npm install
npx prettier --check "**/*.{graphql,yml,json,md,sh,ts,tsx,js}"
npm run typecheck
npm run build
- name: Deploy 🚀
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/grammar-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Check grammar

on:
pull_request:
paths:
- "docs/**"
- "**.md"

jobs:
check-grammar:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "19"

- name: Install write-good
run: npm install write-good

- name: Check grammar
run: npx write-good docs/**/*.md --no-tooWordy --no-passive --no-illusion
2 changes: 1 addition & 1 deletion docs/getting_started/configuration.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -205,4 +205,4 @@ types:
</TabItem>
</Tabs>

The above file is a standard `.graphQL` file, with a few additions such as `@upstream` and `@http` directives. So basically we specify the GraphQL schema and how to resolve that GraphQL schema in the same file, without having to write any code!
The above file is a standard `.graphQL` file, with some minor additions such as `@upstream` and `@http` directives. Basically we specify the GraphQL schema and how to resolve that GraphQL schema in the same file, without having to write any code!
8 changes: 4 additions & 4 deletions docs/getting_started/execute.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sidebar_position: 4
{
"title": "sunt aut facere repellat provident occaecati excepturi option reprehenderit"
}
// Additional posts truncated for brevity
// Posts truncated for brevity
]
},
{
Expand All @@ -44,13 +44,13 @@ sidebar_position: 4
{
"title": "in quibusdam tempore odit est dolorem"
}
// Additional posts truncated for brevity
// Posts truncated for brevity
]
}
// Additional users truncated for brevity
// Users truncated for brevity
]
}
}
```

You can now add additional fields, and compose more queries together!
You can now add more fields, and compose more queries together!
19 changes: 9 additions & 10 deletions docs/getting_started/installation.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: Installation
sidebar_position: 1
sidebar_position: 2
slug: /getting_started
---

Expand All @@ -9,8 +9,7 @@ import Version from "../../src/components/Version"
import InstallCommand from "../../src/components/install"

<>
You can install the latest version -{" "}
**<Version />**, by using<b> NPM</b>.
You can install the latest version - <b><Version /></b>, by using<b> NPM</b>.
</>
## NPM

Expand All @@ -19,7 +18,7 @@ import InstallCommand from "../../src/components/install"
```bash
npm i -g @tailcallhq/tailcall
```
3. Verify that Tailcall is installed correctly by running:
3. To verify the correct installation of Tailcall, run:

```bash
tailcall
Expand All @@ -35,7 +34,7 @@ import InstallCommand from "../../src/components/install"
```bash
yarn global add @tailcallhq/tailcall
```
2. Verify that Tailcall is installed correctly by running:
2. To verify the correct installation of Tailcall, run:

```bash
tailcall
Expand All @@ -50,13 +49,13 @@ import InstallCommand from "../../src/components/install"
brew tap tailcallhq/tailcall
brew install tailcall
```
3. Verify that Tailcall is installed correctly by running:
3. To verify the correct installation of Tailcall, run:
```bash
tailcall
```
4. Once installation is done, **upgrades** can be performed via:
4. After completing the installation, perform **upgrades** with:
```bash
brew update
Expand All @@ -69,7 +68,7 @@ Follow the steps below to manually install the cli on your system:
<InstallCommand />
This command fetches and executes the Tailcall installation script. The installed files are located in the `~/.tailcall` directory.
This command fetches and executes the Tailcall installation script. The `~/.tailcall` directory contains the installed files.
Upon completion of the installation, extend your `PATH` environment variable to include the `~/.tailcall/bin` directory:
Expand All @@ -79,7 +78,7 @@ export PATH=$PATH:~/.tailcall/bin
## Docker
If you want to install Tailcall with Docker, follow the steps below. Before starting, ensure Docker is installed on your system. If not, you can download it from [here](https://www.docker.com/products/docker-desktop).
To install Tailcall with Docker, follow the steps below. Before starting, make sure you have Docker installed on your system. If not, download it from [here](https://www.docker.com/products/docker-desktop).
1. Pull the latest Tailcall Docker image using the following command:
Expand All @@ -97,4 +96,4 @@ If you want to install Tailcall with Docker, follow the steps below. Before star
<Version />
</CodeBlock>
This command starts the Tailcall server in a Docker container. Similar to the homebrew installation, it exposes a the graphQL endpoint on port 8080.
This command launches the Tailcall server in a Docker container, exposing the GraphQL endpoint on port 8080.
13 changes: 13 additions & 0 deletions docs/getting_started/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
title: Introduction
sidebar_position: 1
slug: /
---

Good APIs craft a broad spectrum of functionalities. Yet, the broader their scope, the more they diverge from being the perfect fit for any specific use case. This fundamental discrepancy — the impedance mismatch between the general capabilities of an API and the precise needs of a particular scenario — amplifies the necessity for an orchestration layer. Such a layer adeptly bridges this gap, tailor-fitting generic APIs to meet exact requirements with finesse. Tailcall stands at the forefront of this innovation, seamlessly transforming the way APIs are integrated and interacted with.

Tailcall introduces a robust DSL (Domain-Specific Language), enabling developers to fine-tune how APIs are orchestrated. This DSL facilitates specifying different caching and batching strategies to enhance the system's efficiency. It also enables precise governance and access control mechanisms. Tailcall serves as a central hub for team collaboration, offering a unified point for managing all APIs, documentation, and more. Once configured, it positions itself between the clients and microservices, adeptly managing all requests and orchestrating them as needed.

![Architecture Diagram](/images/docs/architecture.png)

Manually crafting BFF (Backend for Frontend) layers has become outdated. With Tailcall, API orchestration evolves into a streamlined and highly optimized process. It functions as an essential intermediary, intelligently directing requests and assembling responses from each microservice. This approach diminishes the development burden associated with traditional BFF layers but also bolsters performance, reliability, and scalability throughout the application infrastructure.
14 changes: 7 additions & 7 deletions docs/guides/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: CLI
---

The TailCall CLI (Command Line Interface) is an essential part of the TailCall toolkit. It allows developers to manage and optimize GraphQL configurations directly from the command line. Each command within the CLI is designed to handle a specific aspect of GraphQL composition. Below, you'll find a detailed overview of each command, along with its options and usage examples.
The TailCall CLI (Command Line Interface) is an essential part of the TailCall toolkit. It allows developers to manage and optimize GraphQL configurations directly from the command line. Each command within the CLI handles a specific aspect of GraphQL composition. Below, you'll find a detailed overview of each command, along with its options and usage examples.

## check

Expand All @@ -12,7 +12,7 @@ The `check` command validates a composition spec. Notably, this command can dete
tailcall check [options] <file>...
```

The `check` command offers various options that control different settings, such as the display of the generated schema, n + 1 issues etc.
The `check` command offers options that control settings such as the display of the generated schema, n + 1 issues etc.

### --n-plus-one-queries

Expand All @@ -36,7 +36,7 @@ This option enables the display of the schema of the composition spec.
tailcall check --schema <file1> <file2> ... <fileN>
```

The `check` command allows for multiple files. Specify each file path, separated by a space, after the options.
The `check` command allows for files. Specify each file path, separated by a space, after the options.

Example:

Expand All @@ -46,7 +46,7 @@ tailcall check --schema ./path/to/file1.graphql ./path/to/file2.graphql

## compose

The `compose` merges multiple configuration files into one. To use the `compose` command, follow this format:
The `compose` merges configuration files into one. To use the `compose` command, follow this format:

Example:

Expand All @@ -64,15 +64,15 @@ tailcall compose ./path/to/file1.graphql ./path/to/file2.graphql --format gql

## start

The `start` command launches the TailCall Server, acting as a GraphQL proxy with specific configurations. The server can publish various GraphQL configurations.
The `start` command launches the TailCall Server, acting as a GraphQL proxy with specific configurations. The server can publish GraphQL configurations.

To start the server, use the following command:

```bash
tailcall start <file1> <file2> ... <fileN> <http_path1> <http_path2> .. <http_pathN>
```

The `start` command allows for multiple files and supports loading configurations over HTTP. You can mix file system paths with HTTP paths. Specify each path, separated by a space, after the options.
The `start` command allows for files and supports loading configurations over HTTP. You can mix file system paths with HTTP paths. Specify each path, separated by a space, after the options.

Example:

Expand All @@ -88,4 +88,4 @@ The `init` command bootstraps a new TailCall project. It creates the necessary G
tailcall init <file_path>
```

This command prompts for additional file creation and configuration, creating a `.tailcallrc.graphql` file by default.
This command prompts for file creation and configuration, creating a `.tailcallrc.graphql` file by default.
Loading

0 comments on commit e80af05

Please sign in to comment.