relay-mutations-patterns
Installation
SKILL.md
Relay Mutations Patterns
Master Relay mutations for building interactive applications with optimistic updates, connection handling, and declarative data updates.
Overview
Relay mutations provide a declarative way to update data with automatic cache updates, optimistic responses, and rollback on error. Mutations integrate seamlessly with Relay's normalized cache and connection protocol.
Installation and Setup
Mutation Configuration
// mutations/CreatePostMutation.js
import { graphql, commitMutation } from 'react-relay';
import environment from '../RelayEnvironment';