Skip to content

packages/apollo/src

Classes

ClassDescription
ApolloServiceService for managing Apollo Server instance and GraphQL operations. Handles schema resolution, server startup, context creation, and WebSocket subscriptions.
ApolloShutdownServiceInternal provider that shuts the Apollo Server down on application teardown. It disposes every live WebSocket connection (clearing their keep-alive intervals and init timers) and stops the ApolloServer's background machinery, preventing a per-restart leak.
AuthenticationErrorError thrown when the user is not authenticated.
FloatMarker class for GraphQL Float scalar. Use with @Field(() => Float).
ForbiddenErrorError thrown when the user is not authorized to access a resource.
GraphQLListList Type Wrapper
GraphQLModuleGraphQL module for nestelia backed by Apollo Server. Provides static and async configuration methods.
GraphQLNonNullNon-Null Type Wrapper
GraphQLObjectTypeObject Type Definition
GraphQLSchemaSchema Definition
IDMarker class for GraphQL ID scalar. Use with @Field(() => ID).
IntMarker class for GraphQL Int scalar. Use with @Field(() => Int).
PageInfoStandard Relay-style PageInfo object. Included in every Connection type.
SchemaBuilderBuilds a GraphQL schema from decorator metadata stored in typeMetadataStorage. Follows the code-first schema generation pattern.
TypeMetadataStorageGlobal storage for GraphQL type metadata. Fields are stored separately from type declarations. globalThis ensures a single instance even with symlink-based module resolution.
UserInputErrorError thrown when the user input is invalid.
ValidationErrorError thrown when the user input does not pass validation.

Functions

FunctionDescription
ArgsDecorator for resolver arguments.
ArgsTypeArgsType decorator for marking classes as GraphQL arguments DTOs.
ContextDecorator for the GraphQL context. Provides access to the GraphQL request context.
createConnectionTypeCreates a Relay-style Connection type for a given node class. Fields: edges, pageInfo, totalCount.
createEdgeTypeCreates a Relay-style Edge type for a given node class. Fields: node, cursor.
createUnionTypecreateUnionType function for creating GraphQL union types.
DirectiveDecorator for GraphQL Directive.
EnumDecorator for GraphQL Enum.
FieldDecorator for a GraphQL field.
HideFieldHides a field from the GraphQL schema.
InfoDecorator for GraphQL resolve info. Provides access to GraphQL request information (AST, field nodes, etc.).
InputTypeDecorator for GraphQL Input Type.
InterfaceTypeDecorator for GraphQL Interface.
MutationDecorator for a GraphQL Mutation.
ObjectTypeDecorator for GraphQL Object Type.
PaginatedCreates a simple paginated response type for a given item class. Fields: items, total, hasNextPage, hasPreviousPage.
ParentDecorator for the parent/root value in a field resolver. Provides access to the parent object from the field resolver.
processMultipartRequestProcesses a GraphQL multipart request per the GraphQL multipart request spec.
QueryDecorator for a GraphQL Query.
registerEnumTyperegisterEnumType function for registering enums with GraphQL schema.
registerGraphQLRoutesRoute registration function.
ResolveFieldDecorator for a field resolver. Used to resolve individual fields of a type.
ResolverDecorator for a GraphQL resolver class.
ResolverReturnTypeDecorator to explicitly specify the return type of a field resolver.
ReturnTypeDecorator to explicitly specify the return type of a Query.
ScalarDecorator for GraphQL Scalar.
SubscriptionDecorator for a GraphQL Subscription.
UnionDecorator for GraphQL Union.

Interfaces

InterfaceDescription
ApolloContextElysia-specific GraphQL request context.
ApolloOptionsOptions for configuring the GraphQL / Apollo module.
ArgMetadata-
ArgsMetadata-
ArgsOptionsOptions for an argument.
BuildSchemaOptionsOptions for building the GraphQL schema.
ContextMetadata-
CustomScalarInterface for custom scalars.
DirectiveMetadata-
EnumMetadata-
FieldMetadata-
FieldResolverMetadata-
FieldResolverOptionsOptions for the
GqlExecutionContextContext accessor for GraphQL resolvers - mirrors the GqlExecutionContext API.
GqlExecutionContextStaticStatic interface for creating GqlExecutionContext instances.
GraphQLContextGraphQL context available in resolvers.
GraphQLRuntimeContextRuntime context for GraphQL operations.
GraphQLSubscriptionTransportWsOptionsOptions for legacy subscriptions-transport-ws protocol.
GraphQLWsContextContext for GraphQL WebSocket connections.
GraphQLWsSubscriptionsOptionsOptions for GraphQL WebSocket subscriptions (graphql-ws protocol).
InfoMetadata-
InputTypeMetadata-
InterfaceTypeMetadata-
MutationMetadata-
MutationOptionsOptions for the
ObjectTypeMetadata-
ParentMetadata@Parent/Root metadata.
QueryMetadata-
QueryOptionsOptions for the
ResolverMetadata-
ResolverOptionsOptions for the
ReturnTypeMetadata-
ScalarMetadata-
ScalarsTypeMapMapping between TypeScript types and GraphQL scalars.
SubscriptionMetadata-
SubscriptionOptionsOptions for the
UnionMetadata-
UploadedFileRepresents an uploaded file in a GraphQL multipart request. Provides access to file metadata and streaming capabilities.
UploadOptionsOptions for controlling file upload limits in a GraphQL multipart request.

Type Aliases

Type AliasDescription
DateScalarModeDate scalar serialization mode.
GqlContextTypeType identifier for GraphQL context type.
NumberScalarModeNumber scalar serialization mode.
ParamMetadataUnion parameter metadata.
ResolveFnResolve function type for subscriptions.
SubscribeFnSubscribe function type for subscriptions.
SubscriptionConfigSubscription configuration supporting multiple protocols.

Variables

VariableDescription
ARGS_METADATAMetadata key for
CONTEXT_METADATAMetadata key for
CtxAlias for
DIRECTIVE_METADATAMetadata key for
ENUM_METADATAMetadata key for
FIELD_METADATAMetadata key for
FIELD_RESOLVER_METADATAMetadata key for
GQL_OPTIONS_METADATAMetadata key for GraphQL options.
GqlExecutionContextUtility for creating GraphQL execution contexts. Provides access to resolver arguments, context, and GraphQL-specific information.
GraphQLBigIntGraphQL scalar for JavaScript bigint values. Serialized as a string to avoid precision loss.
GraphQLBooleanThe built-in Boolean scalar type.
GraphQLDateTimeGraphQL scalar that serializes JS Date to/from ISO 8601 strings.
GraphQLEmailAddressGraphQL scalar for email address strings (basic RFC format validation).
GraphQLFloatThe built-in Float scalar type.
GraphQLIDThe built-in ID scalar type.
GraphQLIntThe built-in Int scalar type.
GraphQLJSONGraphQL scalar that accepts any JSON-serializable value.
GraphQLStringThe built-in String scalar type.
GraphQLUploadGraphQL scalar type for handling file uploads. Implements the GraphQL multipart request specification.
GraphQLURLGraphQL scalar for validated URL strings.
GraphQLUUIDGraphQL scalar for UUID strings (any version, canonical lowercase format).
HIDDEN_FIELDS_METADATAMetadata key for hidden fields.
INFO_METADATAMetadata key for
INPUT_TYPE_METADATAMetadata key for
INTERFACE_TYPE_METADATAMetadata key for
MUTATION_METADATAMetadata key for
OBJECT_TYPE_METADATAMetadata key for
PARENT_METADATAMetadata key for
QUERY_METADATAMetadata key for
RESOLVER_METADATAMetadata key for
RETURN_TYPE_METADATAMetadata key for return type information.
RootAlias for
SCALAR_METADATAMetadata key for
SUBSCRIPTION_METADATAMetadata key for
typeMetadataStorageGlobal singleton instance of TypeMetadataStorage. Stored on globalThis to ensure a single instance across the application.
UNION_METADATAMetadata key for

References

FieldResolver

Renames and re-exports ResolveField

Released under the MIT License.