Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/holtwood/awesome-cursorrules-zh/graphql-typescript-integrationgit clone --depth 1 https://github.com/holtwood/awesome-cursorrules-zhWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/graphql-typescript-integration)<a href="https://agentmods.dev/rules/holtwood/awesome-cursorrules-zh/graphql-typescript-integration"><img src="https://agentmods.dev/badge/rules/holtwood/awesome-cursorrules-zh/graphql-typescript-integration.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00654 |
| Opus 5 | $0.00000 | $0.00327 |
| Sonnet 5 | $0.00000 | $0.00131 |
| Haiku 4.5 | $0.00000 | $0.00065 |
Grade A, and why
graphql-typescript-integration scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
What it actually says
- 对 GraphQL 操作使用 TypeScript 确保类型安全:
- 代码生成:利用 GraphQL Code Generator 或类似工具,根据 GraphQL schema 和操作(Queries, Mutations, Subscriptions)自动生成 TypeScript 类型定义。
- 类型推断:确保
useQuery、useMutation和useSubscriptionHooks 的返回值(data,loading,error)和变量(variables)都具有正确的类型推断。 - 端到端类型安全:从 GraphQL API 到前端组件,实现端到端的类型安全,减少运行时错误。
- 示例:
// graphql.schema.json (部分) { "data": { "__schema": { "types": [ { "kind": "OBJECT", "name": "User", "fields": [ { "name": "id", "type": { "kind": "NON_NULL", "ofType": { "kind": "SCALAR", "name": "ID" } } }, { "name": "name", "type": { "kind": "SCALAR", "name": "String" } } ] } ] } } } // query.graphql query GetUser($id: ID!) { user(id: $id) { id name } } // generated.ts (通过工具生成) export type GetUserQueryVariables = { id: string; }; export type GetUserQuery = { user?: { __typename?: "User"; id: string; name?: string | null; } | null; }; // component.tsx import { useQuery } from '@apollo/client'; import { GetUserQuery, GetUserQueryVariables } from './generated'; // 假设类型已生成 const GET_USER_QUERY = gql` query GetUser($id: ID!) { user(id: $id) { id name } } `; function UserProfile({ userId }: { userId: string }) { const { data, loading, error } = useQuery<GetUserQuery, GetUserQueryVariables>(GET_USER_QUERY, { variables: { id: userId }, }); if (loading) return <p>Loading...</p>; if (error) return <p>Error: {error.message}</p>; return ( <div> <h1>{data?.user?.name}</h1> <p>ID: {data?.user?.id}</p> </div> ); } - 手动类型定义(不推荐):在无法使用代码生成工具的情况下,可以手动定义 GraphQL 响应的 TypeScript 接口,但这容易出错且难以维护。
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 2d ago First seen · 80 lines · 0 tokens per session scan A 2d3495012769
graphql-typescript-integration is a cursor rule published in the GitHub repository holtwood/awesome-cursorrules-zh (232 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 654 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
component-development
Modern React + TypeScript component patterns — hooks, typed props, performance optimization, forms, and testing.
ai-agent-specialist
Cursor rules for TypeScript, React, Node.js, clean architecture, testing, and WHY-oriented engineering guidance.
astro-typescript-cursorrules-prompt-file
Cursor rules for Astro development with TypeScript integration.
nextjs-tailwind-typescript-apps-cursorrules-prompt
Cursor rules for Next.js development with Tailwind CSS and TypeScript integration.
qwik-basic-cursorrules-prompt-file
Cursor rules for Qwik development with TypeScript and Vite integration.
deno-integration-techniques-cursorrules-prompt-fil
Cursor rules for Deno development with integration techniques.