Cursor React 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 rea,适用于各类文档与内容的智能化处理。
Cursor React 编码规范:来自 PatrickJS/awesome-cursorrules (40k stars) 的 rea,适用于各类文档与内容的智能化处理。
**文件来源:** PatrickJS/awesome-cursorrules → `rules/react-graphql-apollo-client-cursorrules-prompt-file.mdc`
**原仓库:** https://github.com/PatrickJS/awesome-cursorrules
**评分:** ⭐ 仓库 40k stars (社区最权威 Cursor rules 合集)
把 `react-graphql-apollo-client-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。
> Cursor rules for GraphQL development with Apollo Client integration.
globs: **/*
alwaysApply: false
---
// React + GraphQL (Apollo Client) .cursorrules
// Prefer functional components with hooks
const preferFunctionalComponents = true;
// GraphQL and Apollo Client best practices
const graphqlBestPractices = [
"Use Apollo Client for state management and data fetching",
"Implement query components for data fetching",
"Utilize mutations for data modifications",
"Use fragments for reusable query parts",
"Implement proper error handling and loading states",
];
// Folder structure
const folderStructure = `
src/
components/
graphql/
queries/
mutations/
fragments/
hooks/
pages/
utils/
`;
// Additional instructions
const additionalInstructions = `
1. Use Apollo Provider at the root of your app
2. Implement custom hooks for Apollo operations
3. Use TypeScript for type safety with GraphQL operations
4. Utilize Apollo Client's caching capabilities
5. Implement proper error boundaries for GraphQL errors
6. Use Apollo Client DevTools for debugging
7. Follow naming conventions for queries, mutations, and fragments
`;
有问题或建议,在本 skill 下留言。
把 `react-graphql-apollo-client-cursorrules-prompt-file.mdc` 这条 Cursor 编码规则打包成可调用的 AI skill,帮你把代码生成统一到一致的标准上。
> Cursor rules for GraphQL development with Apollo Client integration.