vendure-graphql-writing

Create Vendure GraphQL schema extensions and resolvers with RequestContext and permissions.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/meriley/claude-code-skills --skill vendure-graphql-writing
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: vendure-graphql-writing
Source: https://github.com/meriley/claude-code-skills/tree/main/skills/vendure-graphql-writing
Command: npx skills add https://github.com/meriley/claude-code-skills --skill vendure-graphql-writing

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of extending Vendure's GraphQL API by providing clear patterns and best practices for defining custom types, queries, mutations, and resolvers, ensuring proper integration with Vendure's core features like RequestContext and permissions.

Core Features & Use Cases

  • Schema Definition: Guides the creation of both Admin and Shop API GraphQL schemas using gql template literals.
  • Resolver Implementation: Demonstrates how to write resolvers for Admin and Shop APIs, correctly handling RequestContext, permissions (@Allow), and input types.
  • Plugin Integration: Shows how to register custom schemas and resolvers within a Vendure plugin.
  • Use Case: When adding new features to your Vendure store that require custom data fetching or manipulation via GraphQL, such as adding a new product attribute or a custom order processing mutation.

Quick Start

Use the vendure-graphql-writing skill to create a new GraphQL query for fetching custom product data in the Vendure Shop API.

Frequently Asked Questions about vendure-graphql-writing

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

FAQPage Schema
How do I extend a Vendure GraphQL schema with custom queries and mutations?

To extend a Vendure GraphQL schema, you define custom types, queries, and mutations using gql template literals, then implement resolvers using @Resolver() and @Ctx() decorators to handle RequestContext threading and permissions.

How do I separate custom Vendure GraphQL endpoints for Admin and Shop APIs?

Separating Admin and Shop APIs in Vendure requires defining distinct GraphQL schemas for each API surface and writing dedicated resolvers, ensuring proper permission scoping with the @Allow() decorator for each custom endpoint.

How do I thread RequestContext in a custom Vendure GraphQL resolver?

RequestContext threading in Vendure resolvers is handled using the @Ctx() decorator, which injects the context object into your resolver method arguments to maintain core framework integration.

Do I need NestJS decorators to write custom GraphQL resolvers in Vendure?

Yes, writing custom GraphQL resolvers in Vendure requires NestJS decorators such as @Resolver() for the class definition and @Allow() for managing permissions, integrating with the underlying NestJS framework.

What's the best way to add a custom product attribute to a Vendure store via GraphQL?

Adding custom product attributes in Vendure involves creating a GraphQL schema extension with new input and output types, then registering the custom schema and resolvers within a Vendure plugin.

Why are my custom Vendure GraphQL queries failing permission checks?

Custom Vendure GraphQL queries fail permission checks when resolvers lack the @Allow() decorator, which is required to explicitly define permissions for accessing custom endpoints in both Admin and Shop APIs.