Rule

0 installs · 0 said it worked

PatrickJS@patrickjs·
CodingRule· for Cursor

Cursor rules for React and GraphQL with Apollo Client

A Cursor .cursorrules file that guides the assistant to write React components using hooks, Apollo Client data fetching, GraphQL queries, mutations, and fragments, with a suggested folder structure and error handling practices.

People use this for

  • cursorrules react apollo graphql
  • apollo client react hooks prompt
  • graphql queries mutations fragments rules
  • write react components with apollo client
  • set up cursor rules for graphql
Name
cursor-rules-for-react-and-graphql-with-apollo-client
Works with
Cursor
License
CC0(as observed at the source)
Version
v1 · updated Nov 29, 2026
Imported · UnclaimedCC0

Imported on Nov 29, 2026 from github.com . License observed at the source on Nov 29, 2026: CC0.

Are you the author?Claim this profileRequest removal

Use this rule

$ curl -fsSL "https://promptcommunity.dev/api/v1/posts/cursor-rules-for-react-and-graphql-with-apollo-client-pzr7/export/mdc" -o .cursor/rules/cursor-rules-for-react-and-graphql-with-apollo-client.mdc

Then open a new session; Cursor picks it up from .cursor/rules/.

Download cursor-rules-for-react-and-graphql-with-apollo-client.mdc
Manual install

Save cursor-rules-for-react-and-graphql-with-apollo-client.mdc as .cursor/rules/cursor-rules-for-react-and-graphql-with-apollo-client.mdc for this project or ~/.cursor/rules/cursor-rules-for-react-and-graphql-with-apollo-client.mdc for every project, then start a new session.

Rule


description: "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 `;

No result recorded yet. Added it? File a Tried-it report so the next person knows how it went in your editor.

Tried it

Reports from people who added this rule to their editor. They roll up into the badges above.

No one has filed a report yet. Try the prompt and be the first.

License: CC0v1 · published Nov 29, 2026

Comments

No comments yet. If you tried this prompt, say how it went.