Przejdź do treści
Biblioteka skilli
Programowanie · Budowanie i kod

graphql-implementation

/graphql-implementation

Buduje API GraphQL ze schematem, resolverami, obsługą błędów i optymalizacją wydajności w Apollo lub Graphene, także przy migracji z REST i subskrypcjach czasu rzeczywistego.

Repozytorium
claude-skills ↗
Licencja
MIT
Ostatnia zmiana repozytorium
26.09.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 26.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Buduje API GraphQL ze schematem, resolverami, obsługą błędów i optymalizacją wydajności w Apollo lub Graphene, także przy migracji z REST i subskrypcjach czasu rzeczywistego.

Oryginalny opis (EN)

Builds GraphQL APIs with schema design, resolvers, error handling, and performance optimization using Apollo or Graphene. Use when creating flexible query APIs, migrating from REST, or implementing real-time subscriptions.

Jak działa

  1. Schema Definition
  2. Apollo Server Setup
  3. DataLoader for N+1 Prevention
  4. Error Handling
  5. Best Practices
  6. Python Graphene
Sekcje z nagłówków SKILL.md, w oryginale · 120 linii, 344 słów
Podgląd SKILL.md
---
name: graphql-implementation
description: Builds GraphQL APIs with schema design, resolvers, error handling, and performance optimization using Apollo or Graphene. Use when creating flexible query APIs, migrating from REST, or implementing real-time subscriptions.
license: MIT
---

# GraphQL Implementation

Build GraphQL APIs with proper schema design, resolvers, and performance optimization.

## Schema Definition

```graphql
type User {
  id: ID!
  name: String!
  email: String!
  posts(limit: Int = 10): [Post!]!
}

type Post {
  id: ID!
  title: String!
  content: String!
  author: User!
  createdAt: DateTime!
}

type Query {
  user(id: ID!): User
  users(limit: Int, offset: Int): [User!]!
  post(id: ID!): Post
}

type Mutation {
  createUser(input: CreateUserInput!): User!
  createPost(input: CreatePostInput!): Post!
}

input CreateUserInput {
  name: String!
  email: String!
}
```

## Apollo Server Setup

```javascript
const { ApolloServer } = require('@apollo/server');
const { startStandaloneServer } = require('@apollo/server/standalone');

const resolvers = {
  Query: {
    user: (_, { id }, { dataSources }) =>
      dataSources.userAPI.getUser(id),
    users: (_, { limit, offset }, { dataSources }) =>
      dataSources.userAPI.getUsers({ limit, offset })
  },
  User: {
    posts: (user, { limit }, { dataSources }) =>
      dataSources.postAPI.getPostsByUser(user.id, limit)
  },
  Mutation: {
    createUser: (_, { input }, { dataSources }) =>
      dataSources.userAPI.createUser(input)
  }
};

const server = new ApolloServer({ typeDefs, resolvers });
```

## DataLoader for N+1 Prevention

```javascript
const DataLoader = require('dataloader');

const userLoader = new DataLoader(async (ids) => {
  const users = await User.find({ _id: { $in: ids } });
  return ids.map(id => users.find(u => u.id === id));
});
```

## Error Handling

```javascript
const { GraphQLError } = require('graphql');

throw new GraphQLError('User not found', {
  extensions: { code: 'NOT_FOUND', argumentName: 'id' }
});
```

## Best Practices

- Use DataLoader to batch queries
- Implement query complexity limits
- Design schema around client needs
- Validate all inputs
- Use descriptive naming conventions

## Python Graphene

See [references/python-graphene.md](references/python-graphene.md) for complete Flask implementation with:
- ObjectType definitions
- Query and Mutation classes
- Input types
- Flask integration

## Best Practices

**Do:**
- Use DataLoader to batch queries
- Implement query complexity limits
- Design schema around client needs
- Validate all inputs
- Use descriptive naming conventions
- Add subscriptions for real-time data

**Don't:**
- Allow deeply nested queries without limits
- Expose database internals
- Ignore N+1 query problems
- Return unauthorized data
- Skip input validation
Pliki w paczce (2)
  • SKILL.md 3 KB
  • references/python-graphene.md 5 KB

Wersje

W bazie nie ma innych skilli o nazwie graphql-implementation.

Migawka bazy z 13.11.2026 · wersja paczki c4c90ae59d13 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100building-graphql-server
    Buduje serwery GraphQL gotowe do produkcji, z projektem schematu, resolverami i subskrypcjami.
  • 100building-graphql-server
    Buduje serwery GraphQL gotowe do produkcji, z projektem schematu, resolverami i subskrypcjami.
  • 100graphql
    Pomaga projektować API GraphQL: schemat, zapytania, mutacje i resolvery, a także uwierzytelnianie, paginację, DataLoader i Apollo Server.
  • 100graphql
    Pomaga budować i konsumować API GraphQL: serwer, schematy, resolvery, subskrypcje, uwierzytelnianie, DataLoader, paginacja, przesyłanie plików i migracja z REST przy użyciu Apollo.
  • 95graphql-expert
    Pomaga projektować i wdrażać API GraphQL: schematy, resolvery i optymalizację wydajności.
  • 100graphql-architect
    Wspiera projektowanie schematów GraphQL, wdrażanie Apollo Federation i subskrypcji czasu rzeczywistego, resolvery z DataLoader, optymalizację zapytań oraz dyrektywy federacji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.