Generates an API client that can be used inside a Next.js Server Component with Dynamic Rendering
import { cookies } from "next/headers"const client = generateServerClientUsingCookies({ cookies });const result = await client.graphql({ query: listPosts }); Copy
import { cookies } from "next/headers"const client = generateServerClientUsingCookies({ cookies });const result = await client.graphql({ query: listPosts });
Generates an API client that can be used inside a Next.js Server Component with Dynamic Rendering