webiny-api-graphql-catalog

Catalogs seven GraphQL response and schema abstractions from the Webiny api/graphql package.

8.0k|673|Updated Jan 9, 2018
One-click install
npx skills add https://github.com/webiny/webiny-js --skill webiny-api-graphql-catalog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: webiny-api-graphql-catalog
Source: https://github.com/webiny/webiny-js/tree/main/skills/user-skills/generated/api/graphql
Command: npx skills add https://github.com/webiny/webiny-js --skill webiny-api-graphql-catalog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

When building Webiny API extensions, developers need to know which GraphQL response helpers and schema abstractions exist, where they are defined, and how to import them without digging through the monorepo source code.

Core Features & Use Cases

  • Abstraction Catalog: Lists seven abstractions including Response, ListResponse, ErrorResponse, NotFoundResponse, NotAuthorizedResponse, and GraphQLSchemaFactory.
  • Import Paths: Provides exact import statements and source file locations for each abstraction.
  • Use Case: When writing a custom GraphQL resolver in a Webiny project, look up the correct response helper (e.g., NotFoundResponse) and import it directly with the provided path.

Quick Start

Ask the AI to show the available Webiny GraphQL response helpers and how to import GraphQLSchemaFactory for a custom schema extension.

Frequently Asked Questions about webiny-api-graphql-catalog

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

FAQPage Schema
How do I return a standardized GraphQL response in Webiny?

Import the Response helper from webiny/api/graphql and return it from your resolver. For lists use ListResponse, and for failures use ErrorResponse, ListErrorResponse, NotFoundResponse, or NotAuthorizedResponse depending on the case.

How do I extend the GraphQL schema in a Webiny project?

Use the GraphQLSchemaFactory abstraction from webiny/api/graphql to define custom schema extensions. Its interface is defined in @webiny/api-graphql/graphql/abstractions.ts, which you should read for exact types.

What response helpers does the Webiny GraphQL API provide?

The catalog lists seven abstractions: Response, ListResponse, ErrorResponse, ListErrorResponse, NotFoundResponse, NotAuthorizedResponse, and GraphQLSchemaFactory, each with its import path and source file.

Where are the Webiny GraphQL response helpers defined in source code?

Most helpers live in @webiny/api-graphql/responses.ts, while NotAuthorizedResponse is in @webiny/api-core/graphql/security/NotAuthorizedResponse.ts. The catalog points to each source file so you can read exact interfaces.

When should I use ListResponse versus Response in Webiny resolvers?

Use Response for single-item query or mutation results and ListResponse for queries returning collections. For failures, pair them with ErrorResponse or ListErrorResponse respectively.