graphql
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers
Installation
Pick a client and clone the repository into its skills directory.
Installation
About this skill
GraphQL gives clients exactly the data they need - no more, no less. One endpoint, typed schema, introspection. But the flexibility that makes it powerful also makes it dangerous. Without proper controls, clients can craft queries that bring down your server. This skill covers schema design, resolvers, DataLoader for N+1 prevention, federation for microservices, and client integration with Apollo/urql. Key insight: GraphQL is a contract. The schema is the API documentation. Design it carefully.
How to use
Zainstaluj skill w swoim środowisku Claude/Codex — umożliwi ci dostęp do wzorców GraphQL i anti-wzorców zbieranych z doświadczenia produkcyjnego.
Zacznij od projektowania schematu z właściwą nullability. Określ, które pola mogą być null, a które są obowiązkowe — to fundamentalna decyzja, która wpływa na obsługę błędów u klienta.
Implementuj resolvery z DataLoader do batching zapytań do bazy danych. Skill pokaże ci, jak uniknąć problemu N+1, który powoduje, że każde pole generuje osobne zapytanie.
Ustaw ograniczenia na głębokość i złożoność zapytań, aby zapobiec DDoS-om przez głębokie zagnieżdżone query. Skill zawiera wzorce do walidacji na poziomie serwera.
Wyłącz introspection w produkcji — chroni to schemat przed ujawnieniem. Skill przypomina ci o tej krytycznej konfiguracji bezpieczeństwa.
Integruj klienta Apollo lub urql z znormalizowaną cache i type policies — skill pokazuje, jak uniknąć duplikacji danych po stronie klienta.