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

GraphQL API响应抽象

v20260825
webiny-api-graphql-catalog
本模块提供了一系列GraphQL响应抽象类和辅助类型。它帮助开发者标准化和结构化API的响应数据,涵盖了成功响应、列表数据、通用错误、未授权和未找到等多种场景。使用这些抽象可以确保API交互的健壮性和一致性,提升代码质量。
获取技能
256 次下载
概览

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/api-graphql/responses.ts
Description: GraphQL error response helper.


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


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


Name: ListResponse
Import: import { ListResponse } from "webiny/api/graphql"
Source: @webiny/api-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/api-graphql/responses.ts
Description: GraphQL not-found response helper.


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


信息
分类 编程开发
名称 webiny-api-graphql-catalog
版本 v20260825
大小 1.8KB
更新时间 2026-09-06
语言