adding-entity-types

Scaffold Saleor entity types with Zod schemas, GraphQL operations, and tests.

29|5|Updated Jan 21, 2025
One-click install
npx skills add https://github.com/saleor/configurator --skill adding-entity-types
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: adding-entity-types
Source: https://github.com/saleor/configurator/tree/main/.claude/skills/adding-entity-types
Command: npx skills add https://github.com/saleor/configurator --skill adding-entity-types

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Guides the complete implementation of new Saleor entity types, including schemas, GraphQL operations, repository/service layers, bulk mutations, tests, and deployment pipeline integration.

Core Features & Use Cases

  • Zod schemas: Strong runtime/type-safe validation.
  • GraphQL operations: Typed queries and mutations.
  • Repository pattern: Clear data access layer.
  • Bulk mutations: Efficient large-scale operations.
  • Tests: Unit and integration tests covering new entities.
  • Deployment integration: Pipeline steps to deploy new entities.

Quick Start

Create a new entity type by defining its schema, GraphQL operations, repository, service, tests, and a deployment stage, following the 7-step workflow presented.

Frequently Asked Questions about adding-entity-types

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate the complete setup of a new entity type in Saleor?

Automate entity setup by defining a Zod schema for validation, creating GraphQL operations with gql.tada, building a repository layer for data access, implementing a service layer, adding bulk mutations for large-scale operations, and writing Vitest tests with MSW mocks. The Skill guides you through all seven steps end-to-end, from schema to deployment integration.

What's the best way to structure GraphQL operations and repositories for new Saleor entities?

Structure GraphQL operations using gql.tada for type safety and typed queries/mutations. Pair these with a repository pattern that provides a clear data access layer. This separation ensures your operations stay independent from business logic, making tests and maintenance straightforward while supporting bulk mutations and chunked processing.

How do I implement bulk mutations for processing large volumes of entity data?

Bulk mutations in this workflow handle large-scale operations through chunked processing—dividing requests into manageable batches. The Skill covers how to structure these mutations within your service layer, integrate them with your repository pattern, and test them using Vitest and MSW to ensure reliability at scale.

Can I use Zod schemas with GraphQL operations for entity validation?

Yes. Zod schemas provide runtime and type-safe validation for entities, while GraphQL operations remain independent. Both validate at different layers—Zod at the data boundary and GraphQL at the API contract—giving you dual protection. The Skill shows how to combine them in a cohesive workflow.

What testing approach works best for new entity types and bulk operations?

Use Vitest for unit and integration tests paired with MSW for mocking GraphQL requests. This combination lets you test entity creation, repository queries, service logic, and bulk mutation behavior in isolation without hitting a live API, ensuring your new entities work correctly before deployment.

How do I integrate a new entity type into my deployment pipeline?

The Skill includes deployment pipeline steps that let you add new entities as part of your release process. This ensures schema migrations, GraphQL operation registration, and service initialization happen consistently across environments.