diff --git a/blog/2023-graphql-conf-2023-09-29.md b/blog/2023-graphql-conf-2023-09-29.md index 6ddb47e5a2..3d119f50f2 100644 --- a/blog/2023-graphql-conf-2023-09-29.md +++ b/blog/2023-graphql-conf-2023-09-29.md @@ -9,6 +9,7 @@ hide_table_of_contents: true slug: graphql-conf-2023 canonical_url: https://tailcall.hashnode.dev/graphql-conf-2023 category: Tutorial +featured: true --- GraphQLConf 2023 wasn't just another tech conference; it was a groundbreaking event hosted by the GraphQL Foundation. Bursting with riveting workshops, enlightening talks, and interactive sponsor booths, this conference was a deep dive into the ever-evolving world of GraphQL. diff --git a/blog/api-orchestration-2023-06-12.md b/blog/api-orchestration-2023-06-12.md index 321fb0a389..1216ef7566 100644 --- a/blog/api-orchestration-2023-06-12.md +++ b/blog/api-orchestration-2023-06-12.md @@ -11,6 +11,7 @@ image: /images/blog/bff-architecture.png hide_table_of_contents: true slug: no-one-talks-about-api-orchestration canonical_url: https://tailcall.hashnode.dev/no-one-talks-about-api-orchestration +featured: true --- diff --git a/blog/bff-case-study-2024-08-30.md b/blog/bff-case-study-2024-08-30.md index 59a4987904..79744ddcff 100644 --- a/blog/bff-case-study-2024-08-30.md +++ b/blog/bff-case-study-2024-08-30.md @@ -23,10 +23,6 @@ authors: image_url: https://avatars.githubusercontent.com/u/194482?v=4 --- -import CallToAction from '../src/components/blog/call-to-action.tsx'; - ---- - **Picture this:** 200 million users, countless fantasy teams, and a platform that needs to keep up with the lightning-fast pace of live sports. That was the exciting challenge we faced at [Dream11, India's largest fantasy sports platform](https://www.dream11.com/). @@ -78,13 +74,17 @@ Now, you might be scratching your head, wondering, "Why put an API Gateway after This architecture was our trusted companion for years, scaling effortlessly to serve tens of millions of users. But as with any great journey, we eventually hit a new challenge: the performance of our GraphQL server started to feel the strain of our massive success. - +
+ +
## The GraphQL Advantage: Dream11's Secret Weapon diff --git a/docs/config-generation.md b/docs/config-generation.md index f5d272aebb..1904cb085a 100644 --- a/docs/config-generation.md +++ b/docs/config-generation.md @@ -1,6 +1,6 @@ --- -title: GraphQL Configuration Generation with Tailcall -description: Migrate REST or Protobuff to GraphQL within minutes +title: Automatic GraphQL Configuration Generation with Tailcall +description: Migrate REST or gRPC APIs to GraphQL automatically slug: graphql-configuration-generation-with-tailcall sidebar_label: Auto Generation --- diff --git a/docs/directives.md b/docs/directives.md index 72035acc49..8cda223903 100644 --- a/docs/directives.md +++ b/docs/directives.md @@ -825,6 +825,20 @@ type Query { Read about [n + 1](./N+1.md) to learn how to use the `batchKey` setting. ::: +### onResponseBody + +This hook allows you to intercept and modify the response body from upstream services before it's processed by Tailcall. Like [onRequest](/docs/directives.md#onrequest), it accepts a string value representing a middleware function defined in a JavaScript file. This function can be used to transform or validate the response data. + +```graphql showLineNumbers +type Query { + news: NewsData! + @grpc( + method: "news.NewsService.GetAllNews" + onResponseBody: "onResponse" + ) +} +``` + ## @http Directive The `@http` directive indicates a field or node relies on a REST API. For example: @@ -1006,6 +1020,20 @@ type Query { } ``` +### onResponseBody + +This hook allows you to intercept and modify the response body from upstream services before it's processed by Tailcall. Like [onRequest](/docs/directives.md#onrequest), it accepts a string value representing a middleware function defined in a JavaScript file. This function can be used to transform or validate the response data. + +```graphql showLineNumbers +type Query { + user(id: Int!): User + @http( + path: "/users/{{.args.id}}" + onResponseBody: "onResponse" + ) +} +``` + ## @js Directive The `@js` directive allows you to use JavaScript functions to resolve fields in your GraphQL schema. This can be useful diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx index f6d4362cb1..6091ee7f22 100644 --- a/docs/getting-started.mdx +++ b/docs/getting-started.mdx @@ -11,9 +11,6 @@ import Version from "../src/components/Version" import InstallCommand from "../src/components/install" import Tabs from "@theme/Tabs" import TabItem from "@theme/TabItem" -import Video from "../src/components/video" - -