Reference > API > GraphQL
GraphQL
GraphQL schema factory and response helpers
WHAT YOU'LL LEARN
- How to use the builder and factory APIs?
- How to import and use each exported item?
Overview
This page documents everything exported from webiny/api/graphql. Import any of the items below directly from this path in your Webiny extensions.
Services
Types & Classes
Services
GraphQLSchemaFactory
Abstraction — imported from webiny/api/graphql
Interface GraphQLSchemaFactory.Interface:
GraphQLSchemaFactory
Types:
SchemaBuilder — GraphQLSchemaBuilder.Interface:
Interface for building GraphQL schemas by adding type definitions and resolvers.
| Method | Description |
|---|---|
addTypeDefs() | Add GraphQL type definitions to the schema. |
addResolver<TArgs = any, TParent = any>() | Add a GraphQL resolver with optional dependencies. |
build() | Build and return the GraphQL schema. |
Types & Classes
ErrorResponse
Class — imported from webiny/api/graphql
ListErrorResponse
Class — imported from webiny/api/graphql
ListResponse
Class — imported from webiny/api/graphql
NotAuthorizedResponse
Class — imported from webiny/api/graphql
NotFoundResponse
Class — imported from webiny/api/graphql
Response
Class — imported from webiny/api/graphql