From 02635f562e8821c79daa384478b2f5f7bef54110 Mon Sep 17 00:00:00 2001 From: tusharmath Date: Thu, 29 Feb 2024 03:13:58 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tailcall?= =?UTF-8?q?hq/tailcallhq.github.io@542c618339649b769d51d65e19c26cc0ed5278e?= =?UTF-8?q?c=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 404.html | 4 +- about/index.html | 4 +- assets/js/1ec3b236.36dc870f.js | 1 + assets/js/1ec3b236.8a749975.js | 1 - assets/js/5a3135a8.67ffc9f4.js | 1 - assets/js/5a3135a8.71beea1c.js | 1 + assets/js/935f2afb.5c696b6f.js | 1 + assets/js/935f2afb.f20b82b4.js | 1 - assets/js/a349bb05.2220663b.js | 1 - assets/js/a8e4e161.397cf7c8.js | 1 + assets/js/a8e4e161.b0d14d90.js | 1 - assets/js/d01b1c5d.2f135271.js | 1 + assets/js/d01b1c5d.ca537030.js | 1 - assets/js/d3291ccc.159fde9f.js | 1 + assets/js/d3291ccc.bcbffd46.js | 1 - assets/js/main.938335f3.js | 2 - assets/js/main.c50079c3.js | 2 + ...CENSE.txt => main.c50079c3.js.LICENSE.txt} | 0 assets/js/runtime~main.8bf3c4de.js | 1 + assets/js/runtime~main.b562f2e9.js | 1 - blog/archive/index.html | 4 +- blog/first-blog-post/index.html | 4 +- blog/index.html | 4 +- blog/long-blog-post/index.html | 4 +- blog/mdx-blog-post/index.html | 4 +- blog/tags/docusaurus/index.html | 4 +- blog/tags/facebook/index.html | 4 +- blog/tags/hello/index.html | 4 +- blog/tags/hola/index.html | 4 +- blog/tags/index.html | 4 +- blog/welcome/index.html | 4 +- contact/index.html | 4 +- docs/getting_started/configuration/index.html | 6 +-- docs/getting_started/execute/index.html | 6 +-- docs/getting_started/index.html | 6 +-- docs/getting_started/launch/index.html | 6 +-- docs/guides/cli/index.html | 10 ++-- docs/guides/client-tuning/index.html | 8 +-- docs/guides/context/index.html | 8 +-- docs/guides/environment-variables/index.html | 6 +-- docs/guides/grpc/index.html | 6 +-- docs/guides/http-cache/index.html | 6 +-- docs/guides/logging/index.html | 6 +-- docs/guides/n+1/index.html | 8 +-- docs/guides/operator-composition/index.html | 49 ------------------- docs/guides/watch-mode/index.html | 8 +-- docs/index.html | 6 +-- docs/operators/add-field/index.html | 6 +-- docs/operators/cache/index.html | 6 +-- docs/operators/const/index.html | 6 +-- docs/operators/graphql/index.html | 6 +-- docs/operators/grpc/index.html | 6 +-- docs/operators/http/index.html | 6 +-- docs/operators/index.html | 6 +-- docs/operators/modify/index.html | 6 +-- docs/operators/omit/index.html | 6 +-- docs/operators/server/index.html | 6 +-- docs/operators/upstream/index.html | 6 +-- enterprise/index.html | 4 +- index.html | 4 +- lunr-index-1709172411781.json | 1 - lunr-index-1709176401209.json | 1 + lunr-index.json | 2 +- search-doc-1709172411781.json | 1 - search-doc-1709176401209.json | 1 + search-doc.json | 2 +- 66 files changed, 126 insertions(+), 176 deletions(-) create mode 100644 assets/js/1ec3b236.36dc870f.js delete mode 100644 assets/js/1ec3b236.8a749975.js delete mode 100644 assets/js/5a3135a8.67ffc9f4.js create mode 100644 assets/js/5a3135a8.71beea1c.js create mode 100644 assets/js/935f2afb.5c696b6f.js delete mode 100644 assets/js/935f2afb.f20b82b4.js delete mode 100644 assets/js/a349bb05.2220663b.js create mode 100644 assets/js/a8e4e161.397cf7c8.js delete mode 100644 assets/js/a8e4e161.b0d14d90.js create mode 100644 assets/js/d01b1c5d.2f135271.js delete mode 100644 assets/js/d01b1c5d.ca537030.js create mode 100644 assets/js/d3291ccc.159fde9f.js delete mode 100644 assets/js/d3291ccc.bcbffd46.js delete mode 100644 assets/js/main.938335f3.js create mode 100644 assets/js/main.c50079c3.js rename assets/js/{main.938335f3.js.LICENSE.txt => main.c50079c3.js.LICENSE.txt} (100%) create mode 100644 assets/js/runtime~main.8bf3c4de.js delete mode 100644 assets/js/runtime~main.b562f2e9.js delete mode 100644 docs/guides/operator-composition/index.html delete mode 100644 lunr-index-1709172411781.json create mode 100644 lunr-index-1709176401209.json delete mode 100644 search-doc-1709172411781.json create mode 100644 search-doc-1709176401209.json diff --git a/404.html b/404.html index 4b46e7e580..cb69941a09 100644 --- a/404.html +++ b/404.html @@ -16,8 +16,8 @@ - - + +
Skip to main content

Environment Variables

Environment variables are key-value pairs stored in our operating systems. Most of them come by default, and we can also create our own. They store information used by our operating system or other programs. For example, the PATH variable stores a list of directories the operating system searches when we run a command in the terminal. The HOME variable stores the path to our home directory.

These variables also serve in software development for storing configuration values.

Need for Environment Variables

Applications rely on external tools, authentication methods, and configurations. For proper functioning, our code needs to access these values.

diff --git a/docs/guides/grpc/index.html b/docs/guides/grpc/index.html index 6db19462b3..fcb95b83ff 100644 --- a/docs/guides/grpc/index.html +++ b/docs/guides/grpc/index.html @@ -16,14 +16,14 @@ - - + +

GraphQL on gRPC

In this guide, we will set up a simple gRPC service and use it inside Tailcall's config to fetch some of the data provided by the service. This way Tailcall can provide a single GraphQL interface wrapping any number of gRPC services.

+ Star

GraphQL on gRPC

In this guide, we will set up a simple gRPC service and use it inside Tailcall's config to fetch some of the data provided by the service. This way Tailcall can provide a single GraphQL interface wrapping any number of gRPC services.

What is gRPC?

This guide assumes a basic familiarity with gRPC. It is a high-performance framework created by Google for remote procedure calls (RPCs). Its key features include:

-

By using this approach, you can reduce the number of requests from 101 (for 100 posts plus one initial request for the post list) down to 2. This significant optimization effectively handles the N+1 problem, thereby enhancing your application's efficiency and user experience.

+

By using this approach, you can reduce the number of requests from 101 (for 100 posts plus one initial request for the post list) down to 2. This significant optimization effectively handles the N+1 problem, thereby enhancing your application's efficiency and user experience.

\ No newline at end of file diff --git a/docs/guides/operator-composition/index.html b/docs/guides/operator-composition/index.html deleted file mode 100644 index 5741ebb288..0000000000 --- a/docs/guides/operator-composition/index.html +++ /dev/null @@ -1,49 +0,0 @@ - - - - - -Operator Composition | Tailcall - - - - - - - - - - - - - - - - -

Composition

-

You can combine operators to create new and powerful transformations.

-

This example demonstrates the concept of composition in GraphQL, allowing the combination of operations (known as "operators") to construct more complex data transformations.

-

The given schema is defining two data types - User and Post. The User type has fields id and name, and the Post type initially has fields user and userId.

-
type User {
id: Int
name: String
}

type Post @addField(name: "userName", path: ["user", "name"]) {
user: User @modify(omit: true) @http(path: "/users/{{userId}}")
userId: Int!
}
-

It uses a series of operators to modify the user field.

-
    -
  1. -

    The @addField(name: "userName", path: ["user", "name"]) operator extracts the name field from user and adds a field called userName to the Post

    -
  2. -
  3. -

    The @modify(omit: true) operator removes the user field from the final Schema.

    -
  4. -
  5. -

    The @http(path: "/users/{{userId}}") operator instructs the resolver to make an HTTP request to fetch the user data from a specified path (i.e., /users/{{userId}}), with {{userId}} serving as a placeholder that the system replaces with the actual userId upon making the request.

    -
  6. -
-

The schema after this transformation looks like this:

-
type User {
id: Int
name: String
}

type Post {
userName: String
userId: Int!
}
-

We've used composition of operators to take a complex object (the User inside the Post), extract a specific part of it (name), name that part (userName), and then instruct GraphQL how to fetch the data using an HTTP request.

-
info

It's important to note that the order of the operators @modify and @http doesn't matter. The resulting schema will always be the same.

-

This is a powerful mechanism that allows you to make your GraphQL schema more precise, easier to understand, and more suitable for the specific needs of your application.

- - \ No newline at end of file diff --git a/docs/guides/watch-mode/index.html b/docs/guides/watch-mode/index.html index 91b5b15c02..0f53d20c41 100644 --- a/docs/guides/watch-mode/index.html +++ b/docs/guides/watch-mode/index.html @@ -16,14 +16,14 @@ - - + +

Watch Mode

Developers often find themselves in situations where they need to run a server in watch mode to streamline the development process. This guide will introduce you to entr, a versatile file-watcher tool, and how to run your server in watch mode with it. We'll also touch on the installation process and suggest some best practices to optimize your workflow.

+ Star

Watch Mode

Developers often find themselves in situations where they need to run a server in watch mode to streamline the development process. This guide will introduce you to entr, a versatile file-watcher tool, and how to run your server in watch mode with it. We'll also touch on the installation process and suggest some best practices to optimize your workflow.

Use case

Running a server in watch mode offers a lot of key benefits:

    @@ -132,6 +132,6 @@

    So

    Update entr: Ensure entr is always updated to the latest version for bug fixes and enhancements.

    -

    By following these best practices and using entr effectively, you can greatly improve your development workflow. Experiment with entr, adapt it to your project's specific requirements, and enjoy a smoother and more efficient development process. Happy coding!

+

By following these best practices and using entr effectively, you can greatly improve your development workflow. Experiment with entr, adapt it to your project's specific requirements, and enjoy a smoother and more efficient development process. Happy coding!

\ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 317af97624..7e7f6fe50f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -16,14 +16,14 @@ - - + +

Introduction

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.

+ Star

Introduction

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

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.

diff --git a/docs/operators/add-field/index.html b/docs/operators/add-field/index.html index 502cfc19dd..6368abf47f 100644 --- a/docs/operators/add-field/index.html +++ b/docs/operators/add-field/index.html @@ -16,14 +16,14 @@ - - + +

@addField

The @addField operator simplifies data structures and queries by adding a field that inline or flattens a nested field or node within your schema. It modifies the schema and the data transformation process, making nested data more accessible and straightforward to present.

+ Star

@addField

The @addField operator simplifies data structures and queries by adding a field that inline or flattens a nested field or node within your schema. It modifies the schema and the data transformation process, making nested data more accessible and straightforward to present.

For instance, consider a schema:

schema {
query: Query
}

type User @addField(name: "street", path: ["address", "street"]) {
id: Int!
name: String!
username: String!
email: String!
phone: String
website: String
address: Address @modify(omit: true)
}

type Address {
street: String!
city: String!
state: String!
}

type Query {
user(id: Int!): User @http(path: "/users/{{args.id}}")
}

Suppose we focus on the street field in Address.

diff --git a/docs/operators/cache/index.html b/docs/operators/cache/index.html index 0a43f8acf4..c8fac2d7cf 100644 --- a/docs/operators/cache/index.html +++ b/docs/operators/cache/index.html @@ -16,14 +16,14 @@ - - + +

@cache

The @cache directive provides a protocol agnostic mechanism for caching the results of fields within a GraphQL schema. Like any other cache implementation, this feature is useful for optimizing performance by reducing the need to fetch data that doesn't change frequently.

+ Star

@cache

The @cache directive provides a protocol agnostic mechanism for caching the results of fields within a GraphQL schema. Like any other cache implementation, this feature is useful for optimizing performance by reducing the need to fetch data that doesn't change frequently.

maxAge

@cache(maxAge: Int)

This parameter is a non-zero unsigned integer specifying the duration, in milliseconds, that retains the cached value.

diff --git a/docs/operators/const/index.html b/docs/operators/const/index.html index 5386e36f61..55a2e74cbb 100644 --- a/docs/operators/const/index.html +++ b/docs/operators/const/index.html @@ -16,14 +16,14 @@ - - + +

@const

The @const directive in GraphQL is a powerful tool for embedding data directly into your schema, offering two primary functionalities:

+ Star

@const

The @const directive in GraphQL is a powerful tool for embedding data directly into your schema, offering two primary functionalities:

  1. Static Response: This feature allows for the inclusion of a constant response within the schema definition itself. It is useful for scenarios where the response is static and unchanging. e.g:

    diff --git a/docs/operators/graphql/index.html b/docs/operators/graphql/index.html index 1a2830f3c3..5b96ce25da 100644 --- a/docs/operators/graphql/index.html +++ b/docs/operators/graphql/index.html @@ -16,14 +16,14 @@ - - + +

    @graphQL

    @graphQL

    The @graphQL operator allows to specify GraphQL API server request to fetch data from.

    type Query {
    users: [User] @graphQL(name: "userList")
    }

    The @graphQL operator facilitates fetching a list of users from the GraphQL API upstream. The name argument specifies the root field's name on the upstream server. The upcoming request to the Tailcall server determines the User type's inner fields for the request. Depending on the operation type within which one finds the @graphQL operator, the Tailcall config determines the query's operation type.

    diff --git a/docs/operators/grpc/index.html b/docs/operators/grpc/index.html index 15fb11b482..60b3337841 100644 --- a/docs/operators/grpc/index.html +++ b/docs/operators/grpc/index.html @@ -16,14 +16,14 @@ - - + +

    @grpc

    The @grpc directive enables the resolution of GraphQL fields via gRPC services. Below is an illustrative example of how to apply this directive within a GraphQL schema:

    + Star

    @grpc

    The @grpc directive enables the resolution of GraphQL fields via gRPC services. Below is an illustrative example of how to apply this directive within a GraphQL schema:

    schema @link(src: "./users.proto", type: Protobuf) {
    query: Query
    }

    type Query {
    users: [User] @grpc(method: "users.UserService.ListUsers")
    }

    This schema snippet demonstrates the directive's application, where a query for users triggers a gRPC request to the UserService's ListUsers method, thereby fetching the user data.

    Understanding the Proto File Structure

    diff --git a/docs/operators/http/index.html b/docs/operators/http/index.html index 4b6ad10cd7..d439ebc566 100644 --- a/docs/operators/http/index.html +++ b/docs/operators/http/index.html @@ -16,14 +16,14 @@ - - + +

    @http

    The @http operator indicates a field or node relies on a REST API. For example:

    + Star

    @http

    The @http operator indicates a field or node relies on a REST API. For example:

    type Query {
    users: [User] @http(path: "/users")
    }

    In this example, adding the @http operator to the users field of the Query type indicates reliance on a REST API for the users field. The path argument specifies the REST API's path, which is /users in this scenario.Querying the users field prompts the GraphQL server to issue a GET request to https://jsonplaceholder.typicode.com/users.

    baseURL

    diff --git a/docs/operators/index.html b/docs/operators/index.html index 7bd2b70db2..b97b22c54a 100644 --- a/docs/operators/index.html +++ b/docs/operators/index.html @@ -16,14 +16,14 @@ - - + +

    Operators

    Tailcall DSL builds on your existing GraphQL knowledge by allowing the addition of some custom operators. These operators provide powerful compile time guarantees to ensure your API composition is tight and robust. The system automatically generates highly optimized resolver logic for your types using the operator information.

    + Star

    Operators

    Tailcall DSL builds on your existing GraphQL knowledge by allowing the addition of some custom operators. These operators provide powerful compile time guarantees to ensure your API composition is tight and robust. The system automatically generates highly optimized resolver logic for your types using the operator information.

    Here is a list of all the custom operators supported by Tailcall:

    Certainly! Here's the table with hyperlinks added back to the operator names:

    OperatorDescription
    @addFieldSimplifies data structures and queries by adding, inlining, or flattening fields or nodes within the schema.
    @cacheEnables caching for the query, field or type applied to.
    @constAllows embedding of a constant response within the schema.
    @graphQLResolves a field or node by a GraphQL API.
    @grpcResolves a field or node by a gRPC API.
    @httpResolves a field or node by a REST API.
    @modifyEnables changes to attributes of fields or nodes in the schema.
    @omitExcludes fields or nodes from the generated schema, making them inaccessible through the GraphQL API.
    @serverProvides server configurations for behavior tuning and tailcall optimization in specific use-cases.
    @upstreamControls aspects of the upstream server connection, including timeouts and keep-alive settings.
    diff --git a/docs/operators/modify/index.html b/docs/operators/modify/index.html index 13ddbec743..52ea76767e 100644 --- a/docs/operators/modify/index.html +++ b/docs/operators/modify/index.html @@ -16,14 +16,14 @@ - - + +

    @modify

    The @modify operator in GraphQL provides the flexibility to alter the attributes of a field or a node within your GraphQL schema. Here's how you can use this operator:

    + Star

    @modify

    The @modify operator in GraphQL provides the flexibility to alter the attributes of a field or a node within your GraphQL schema. Here's how you can use this operator:

    name

    You can rename a field or a node in your GraphQL schema using the name argument in the @modify operator. This can be helpful when the field name in your underlying data source doesn't match the desired field name in your schema. For instance:

    type User {
    id: Int! @modify(name: "userId")
    }
    diff --git a/docs/operators/omit/index.html b/docs/operators/omit/index.html index ad7cd72ac5..965221b1ac 100644 --- a/docs/operators/omit/index.html +++ b/docs/operators/omit/index.html @@ -16,14 +16,14 @@ - - + +

    @omit

    Within a GraphQL schema, the @omit operator excludes fields or nodes from the generated schema, making them inaccessible through the GraphQL API. This operator is useful for hiding sensitive information or simplifying your API by removing unnecessary fields.

    + Star

    @omit

    Within a GraphQL schema, the @omit operator excludes fields or nodes from the generated schema, making them inaccessible through the GraphQL API. This operator is useful for hiding sensitive information or simplifying your API by removing unnecessary fields.

    How it works

    When applied to a field or node, the @omit operator instructs the Tailcall not to include that field or node in the schema. This means that clients cannot query or mutate data in those fields.

    Example

    diff --git a/docs/operators/server/index.html b/docs/operators/server/index.html index cc4a26544f..9119e54e6c 100644 --- a/docs/operators/server/index.html +++ b/docs/operators/server/index.html @@ -16,14 +16,14 @@ - - + +

    @server

    The @server directive, applied at the schema level, provides a comprehensive set of server configurations. It dictates server behavior and helps tune Tailcall for a range of use-cases.

    + Star

    @server

    The @server directive, applied at the schema level, provides a comprehensive set of server configurations. It dictates server behavior and helps tune Tailcall for a range of use-cases.

    schema @server(...[ServerSettings]...){
    query: Query
    mutation: Mutation
    }

    In this templated structure, replace ...[ServerSettings]... with specific configurations tailored to your project's needs. Adjust and expand these settings as necessary.

    The ServerSettings options and their details appear below.

    diff --git a/docs/operators/upstream/index.html b/docs/operators/upstream/index.html index c44276522a..f10932b0d3 100644 --- a/docs/operators/upstream/index.html +++ b/docs/operators/upstream/index.html @@ -16,14 +16,14 @@ - - + +

    @upstream

    The upstream directive enables control over specific aspects of the upstream server connection, including settings such as connection timeouts, keep-alive intervals, and more. The system applies default values if you do not specify them.

    + Star

    @upstream

    The upstream directive enables control over specific aspects of the upstream server connection, including settings such as connection timeouts, keep-alive intervals, and more. The system applies default values if you do not specify them.

    schema @upstream(...[UpstreamSetting]...){
    query: Query
    mutation: Mutation
    }

    The document below details the options for UpstreamSetting.

    poolIdleTimeout

    diff --git a/enterprise/index.html b/enterprise/index.html index 4ce8ae918a..b3799efadc 100644 --- a/enterprise/index.html +++ b/enterprise/index.html @@ -16,8 +16,8 @@ - - + +