Skip to content
Back to skills

Architecture Andreibesleaga Gabbe 2

ASecurity

Schema design, federation, and resolution strategies.

  • 30 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 12, 2026
ai-agentsgonodeapisecurity

Works with

  • cursor
  • cli
  • api

Security analysis

A100/100

Scanned November 12, 2026

npx -y skills add majiayu000/claude-skill-registry-data --skill architecture-andreibesleaga-gabbe-2 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Architecture Andreibesleaga Gabbe 2?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Architecture Andreibesleaga Gabbe 2
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/majiayu000-architecture-andreibesleaga-gabbe-2-claude-skill-registry-data/badge)](https://www.skillsdirectory.com/skills/majiayu000-architecture-andreibesleaga-gabbe-2-claude-skill-registry-data)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: graphql-schema
description: Schema design, federation, and resolution strategies.
role: eng-api
triggers:
  - graphql
  - schema
  - resolver
  - federation
  - apollo
  - gql
---

# graphql-schema Skill

This skill prevents "Graph Spaghetti" and ensuring performant Graph APIs.

## 1. Schema Design
- **Consumption-First**: Design for the UI needs, not the DB schema.
- **Naming**: `User.posts` (Good), `User.getPosts` (Bad - it's a field, not a method).
- **Nullability**:
  - Default to **Nullable** for fields (resilience: if one field fails, partial data returns).
  - Use **Non-Null (!)** only for IDs and essential arguments.

## 2. N+1 Problem (The Graph Killer)
- **Scenario**: Querying `users { posts { comments } }`.
- **Solution**: **DataLoader** pattern.
  - Batches IDs from multiple resolvers.
  - Runs *one* DB query: `SELECT * FROM posts WHERE user_id IN (1, 2, 3)`.
  - Distributes results back to resolvers.

## 3. Pagination
- Avoid `offset`/`limit`.
- Use **Relay Connection Specification** (Cursor-based):
  ```graphql
  users(first: 10, after: "cursor") {
    edges {
      node { name }
      cursor
    }
    pageInfo { hasNextPage }
  }
  ```

## 4. Security
- **Depth Limiting**: Block queries deeper than 5 levels (prevent cyclic recursion DoS).
- **Cost Analysis**: Assign points to fields. Block query if Cost > 1000.
- **Introspection**: Disable in Production.

## 5. Federation (Apollo)
- Use when splitting Graph across microservices.
- **Entity**: A type shared across subgraphs (`@key(fields: "id")`).
- **Gateway**: Composes the Supergraph.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.