graphql-expert
यह क्या करती है
यह स्किल GraphQL APIs डिज़ाइन करने का मार्गदर्शन देती है, जिसमें schema types, resolvers, real-time subscriptions और performance सीमाएँ शामिल हैं। यह उन बैकएंड डेवलपरों के लिए है जो ऐसे APIs बनाते हैं जिन्हें कई क्लाइंट इस्तेमाल करते हैं।
कब इस्तेमाल करें
- ✓जब आप किसी ऐप या API के लिए नया GraphQL schema डिज़ाइन कर रहे हों।
- ✓जब बार-बार होने वाली database calls से GraphQL queries धीमी चलें।
- ✓जब आपको GraphQL subscriptions से real-time अपडेट चाहिए।
Skill का लिंक
https://github.com/RightNow-AI/openfang/blob/main/crates/openfang-skills/bundled/graphql-expert/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“orders और customers के लिए GraphQL schema डिज़ाइन कीजिए, और दिखाइए कि orders की सूची बनाते समय बार-बार database calls से कैसे बचें।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
स्किल domain को साफ़ मॉडल करने, DataLoader से data access को batch करने, फ़ील्ड हटाने से पहले deprecate करने, और query की गहराई व लागत सीमित करने की सलाह देती है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
GraphQL Expert
A backend API architect with deep expertise in GraphQL schema design, resolver implementation, real-time subscriptions, and query performance optimization. This skill provides guidance for building robust, well-typed GraphQL APIs that scale efficiently while maintaining an excellent developer experience for API consumers.
Key Principles
- Design schemas around the domain model, not the database schema; GraphQL types should represent business concepts with clear relationships
- Use input types for mutations and keep query arguments minimal; complex filtering belongs in dedicated input types
- Prevent the N+1 query problem proactively by implementing DataLoader patterns for every resolver that accesses a data source
- Treat the schema as a contract; use deprecation directives before removing fields and version through additive changes rather than breaking ones
- Enforce query complexity limits and depth restrictions at the server level to prevent abusive or accidentally expensive queries
Techniques
- Define types with clear nullability: non-null (String!) for required fields, nullable for fields that may genuinely be absent
- Implement resolvers that return promises and batch data access; use DataLoader to batch and cache database calls within a single request
- Set up subscriptions over WebSocket (graphql-ws protocol) with proper connection lifecycle handling (init, ack, keep-alive, terminate)
- Use fragments to share field selections across queries and reduce duplication in client-side code
- Apply custom directives (@auth, @deprecated, @cacheControl) for cross-cutting concerns like authorization and cache hints
- Implement cursor-based pagination following the Relay connection specification (edges, nodes, pageInfo with hasNextPage and endCursor)
- Structure error responses with extensions field for error codes and machine-readable metadata alongside human-readable messages
Common Patterns
- Schema Federation: Split a monolithic schema into domain-specific subgraphs that compose into a unified supergraph via a gateway, enabling independent team ownership
- Persisted Queries: Hash and store approved queries server-side; clients send only the hash, reducing bandwidth and preventing arbitrary query execution
- Optimistic UI Updates: Design mutations to return the mutated object so clients can update their local cache immediately without a refetch
- Batch Mutations: Accept arrays in input types for bulk operations while returning per-item results with success/failure status for each entry
Pitfalls to Avoid
- Do not expose raw database IDs as the primary identifier; use opaque, globally unique IDs (base64 encoded type:id) for Relay compatibility
- Do not nest resolvers deeply without complexity analysis; a query requesting 5 levels of nested connections can explode into millions of database rows
- Do not return generic error strings; structure errors with codes, paths, and extensions so clients can programmatically handle different failure modes
- Do not skip input validation in resolvers; even though the schema enforces types, business rules like max lengths and allowed values need explicit checks
अक्सर पूछे जाने वाले सवाल
N+1 समस्या क्या है?
जब सूची के हर आइटम पर एक database call होती है, तब API धीमा होता है; DataLoader इन calls को batch करता है।
query की गहराई क्यों सीमित करें?
सीमा क्लाइंट्स को ऐसी महँगी queries भेजने से रोकती है जो सर्वर पर भारी पड़ें।
जो फ़ील्ड नहीं चाहिए उसे कैसे बदलूँ?
स्किल पहले उसे deprecated चिह्नित करने का सुझाव देती है, ताकि मौजूदा क्लाइंट चलते रहें और धीरे-धीरे बदलें।
जानकारी
लेखक का मूल विवरण
GraphQL expert for schema design, resolvers, subscriptions, and performance optimization
repo: RightNow-AI/openfang
लोकप्रियता
- GitHub स्टार
- 18k
- रैंकिंग में स्थान
- #10682
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/7/2026
कमेंट
- …
इस repository की और skills
browser-automation
18kयह आपके एजेंट को Playwright से वेब ब्राउज़र नियंत्रित करना सिखाती है, बटन, फ़ॉर्म और लिंक खोजने के लिए CSS selectors का उपयोग करते हुए।
clip-hand-skill
18kयह आपके एजेंट को वीडियो क्लिप बनाने में मदद करती है: वीडियो डाउनलोड करना, उसकी बोली ट्रांसक्राइब करना, subtitle फ़ाइलें बनाना और ffmpeg से क्लिप काटना।
collector-hand-skill
18kयह आपके एजेंट को किसी विषय या कंपनी पर सार्वजनिक जानकारी जुटाने, मुख्य entities निकालने, बदलाव ट्रैक करने और भावना का अंदाज़ा लगाने में मदद करती है।
infisical-sync-skill
18kयह आपके एजेंट को API के ज़रिए Infisical vault में secrets पढ़ने और अपडेट करने में मदद करती है, login के चरणों और साफ़ error संभालने के साथ।
मिलती-जुलती skills
api-connector-builder
280kयह आपके एजेंट को मौजूदा pattern के हिसाब से नए API connections बनाने देता है। जब बिना कोई नया तरीका बनाए एक और integration जोड़ना हो, तब इसका इस्तेमाल करें।
api-design
280kयह आपके एजेंट को best practices के हिसाब से REST APIs डिज़ाइन करने में मदद करता है। यह तय करने में काम आता है कि APIs आपस में कैसे बात करें, errors कैसे दिखें, और data को कैसे व्यवस्थित करें।
backend-patterns
280kआपके एजेंट को server-side architecture patterns और database optimization में मदद करता है। server पर चलने वाला code बनाने या review करने के लिए उपयोगी है।