技能 编程开发 GraphQL API抽象与响应处理

GraphQL API抽象与响应处理

v20260424
webiny-api-graphql-catalog
本技能集提供了一系列用于构建健壮、类型安全的GraphQL API的核心抽象类和辅助工具。它标准化了API的常见响应模式(如成功、列表、错误、未找到、未授权),并提供了定义自定义Schema的工厂。使用这些抽象可以确保整个后端服务的响应结构和错误处理具备高度的一致性和规范性。
获取技能
277 次下载
概览

api/graphql

How to Use

  1. Find the abstraction you need below
  2. You MUST read the source file to get the exact interface and types!
  3. Import: import { Name } from "<importPath>";
  4. See webiny-use-case-pattern or webiny-event-handler-pattern skills for implementation patterns

Abstractions


Name: ErrorResponse Import: import { ErrorResponse } from "webiny/api/graphql" Source: @webiny/handler-graphql/responses.ts Description: GraphQL error response helper.


Name: GraphQLSchemaFactory Import: import { GraphQLSchemaFactory } from "webiny/api/graphql" Source: @webiny/handler-graphql/graphql/abstractions.ts Description: Define custom GraphQL schema extensions.


Name: ListErrorResponse Import: import { ListErrorResponse } from "webiny/api/graphql" Source: @webiny/handler-graphql/responses.ts Description: GraphQL list error response helper.


Name: ListResponse Import: import { ListResponse } from "webiny/api/graphql" Source: @webiny/handler-graphql/responses.ts Description: GraphQL list response helper.


Name: NotAuthorizedResponse Import: import { NotAuthorizedResponse } from "webiny/api/graphql" Source: @webiny/api-core/graphql/security/NotAuthorizedResponse.ts Description: GraphQL not-authorized response helper.


Name: NotFoundResponse Import: import { NotFoundResponse } from "webiny/api/graphql" Source: @webiny/handler-graphql/responses.ts Description: GraphQL not-found response helper.


Name: Response Import: import { Response } from "webiny/api/graphql" Source: @webiny/handler-graphql/responses.ts Description: GraphQL response helper.


信息
Category 编程开发
Name webiny-api-graphql-catalog
版本 v20260424
大小 1.84KB
更新时间 2026-04-28
语言