graphql-extend

Extend Deenruv GraphQL APIs with new types and resolvers.

11|1|Updated Oct 4, 2024
One-click install
npx skills add https://github.com/aexol-studio/deenruv --skill graphql-extend
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: graphql-extend
Source: https://github.com/aexol-studio/deenruv/tree/main/.opencode/skills/graphql-extend
Command: npx skills add https://github.com/aexol-studio/deenruv --skill graphql-extend

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill provides a structured approach to extending the Deenruv GraphQL API by adding new types, queries, mutations, and resolvers across server and client layers.

Core Features & Use Cases

  • Server-side extensions: define new schema extensions and resolvers for Admin/Shop APIs inside plugin-server and register them in the plugin.
  • Client-side integrations: generate and use Zeus types to write type-safe queries and mutations against the extended API.
  • Use Case: a plugin needs a new feature flag query and a mutation to toggle it, coordinated between server and UI with proper permissions and code generation.

Quick Start

Install and wire the new GraphQL extensions in your plugin, add the Admin/Shop API extension code, run codegen to regenerate Zeus types, and start the server to use the new types in the UI.

Frequently Asked Questions about graphql-extend

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

FAQPage Schema
How do I extend a GraphQL API with new types and resolvers in NestJS?

To extend a GraphQL API with new types and resolvers in NestJS, you define new schema extensions and resolvers for Admin or Shop APIs inside the plugin server and register them within the plugin.

How does Zeus type generation work for GraphQL plugin extensions?

Zeus type generation for GraphQL plugin extensions works by running codegen to regenerate type-safe TypeScript types after adding new schema extensions, allowing the UI to write type-safe queries and mutations against the extended API.

Can I add new queries and mutations to a plugin without breaking existing permissions?

Yes, extending a plugin API with new queries and mutations satisfies schema extension practices that include permissions configuration, ensuring new resolvers coordinate safely with existing server-side access controls.

What is the best way to coordinate a new feature flag mutation between a NestJS server and a client UI?

The best way to coordinate a feature flag mutation is to add the server-side resolver and schema extension, run codegen for Zeus types, and use those generated types to call the mutation from the UI.

Does this GraphQL extension approach support both Admin and Shop APIs?

Yes, this GraphQL extension approach supports defining new schema extensions and resolvers for both Admin and Shop APIs, allowing targeted plugin functionality across different API layers.

What are the limitations of using Zeus types for client-side GraphQL extensions?

Using Zeus types for client-side GraphQL extensions requires running codegen to regenerate types after every schema change, meaning the client types are only accurate after the server-side extension is fully defined.