packages/apollo/src
Classes
| Class | Description |
|---|---|
| ApolloService | Service for managing Apollo Server instance and GraphQL operations. Handles schema resolution, server startup, context creation, and WebSocket subscriptions. |
| ApolloShutdownService | Internal 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. |
| AuthenticationError | Error thrown when the user is not authenticated. |
| Float | Marker class for GraphQL Float scalar. Use with @Field(() => Float). |
| ForbiddenError | Error thrown when the user is not authorized to access a resource. |
| GraphQLList | List Type Wrapper |
| GraphQLModule | GraphQL module for nestelia backed by Apollo Server. Provides static and async configuration methods. |
| GraphQLNonNull | Non-Null Type Wrapper |
| GraphQLObjectType | Object Type Definition |
| GraphQLSchema | Schema Definition |
| ID | Marker class for GraphQL ID scalar. Use with @Field(() => ID). |
| Int | Marker class for GraphQL Int scalar. Use with @Field(() => Int). |
| PageInfo | Standard Relay-style PageInfo object. Included in every Connection type. |
| SchemaBuilder | Builds a GraphQL schema from decorator metadata stored in typeMetadataStorage. Follows the code-first schema generation pattern. |
| TypeMetadataStorage | Global storage for GraphQL type metadata. Fields are stored separately from type declarations. globalThis ensures a single instance even with symlink-based module resolution. |
| UserInputError | Error thrown when the user input is invalid. |
| ValidationError | Error thrown when the user input does not pass validation. |
Functions
| Function | Description |
|---|---|
| Args | Decorator for resolver arguments. |
| ArgsType | ArgsType decorator for marking classes as GraphQL arguments DTOs. |
| Context | Decorator for the GraphQL context. Provides access to the GraphQL request context. |
| createConnectionType | Creates a Relay-style Connection type for a given node class. Fields: edges, pageInfo, totalCount. |
| createEdgeType | Creates a Relay-style Edge type for a given node class. Fields: node, cursor. |
| createUnionType | createUnionType function for creating GraphQL union types. |
| Directive | Decorator for GraphQL Directive. |
| Enum | Decorator for GraphQL Enum. |
| Field | Decorator for a GraphQL field. |
| HideField | Hides a field from the GraphQL schema. |
| Info | Decorator for GraphQL resolve info. Provides access to GraphQL request information (AST, field nodes, etc.). |
| InputType | Decorator for GraphQL Input Type. |
| InterfaceType | Decorator for GraphQL Interface. |
| Mutation | Decorator for a GraphQL Mutation. |
| ObjectType | Decorator for GraphQL Object Type. |
| Paginated | Creates a simple paginated response type for a given item class. Fields: items, total, hasNextPage, hasPreviousPage. |
| Parent | Decorator for the parent/root value in a field resolver. Provides access to the parent object from the field resolver. |
| processMultipartRequest | Processes a GraphQL multipart request per the GraphQL multipart request spec. |
| Query | Decorator for a GraphQL Query. |
| registerEnumType | registerEnumType function for registering enums with GraphQL schema. |
| registerGraphQLRoutes | Route registration function. |
| ResolveField | Decorator for a field resolver. Used to resolve individual fields of a type. |
| Resolver | Decorator for a GraphQL resolver class. |
| ResolverReturnType | Decorator to explicitly specify the return type of a field resolver. |
| ReturnType | Decorator to explicitly specify the return type of a Query. |
| Scalar | Decorator for GraphQL Scalar. |
| Subscription | Decorator for a GraphQL Subscription. |
| Union | Decorator for GraphQL Union. |
Interfaces
| Interface | Description |
|---|---|
| ApolloContext | Elysia-specific GraphQL request context. |
| ApolloOptions | Options for configuring the GraphQL / Apollo module. |
| ArgMetadata | - |
| ArgsMetadata | - |
| ArgsOptions | Options for an argument. |
| BuildSchemaOptions | Options for building the GraphQL schema. |
| ContextMetadata | - |
| CustomScalar | Interface for custom scalars. |
| DirectiveMetadata | - |
| EnumMetadata | - |
| FieldMetadata | - |
| FieldResolverMetadata | - |
| FieldResolverOptions | Options for the |
| GqlExecutionContext | Context accessor for GraphQL resolvers - mirrors the GqlExecutionContext API. |
| GqlExecutionContextStatic | Static interface for creating GqlExecutionContext instances. |
| GraphQLContext | GraphQL context available in resolvers. |
| GraphQLRuntimeContext | Runtime context for GraphQL operations. |
| GraphQLSubscriptionTransportWsOptions | Options for legacy subscriptions-transport-ws protocol. |
| GraphQLWsContext | Context for GraphQL WebSocket connections. |
| GraphQLWsSubscriptionsOptions | Options for GraphQL WebSocket subscriptions (graphql-ws protocol). |
| InfoMetadata | - |
| InputTypeMetadata | - |
| InterfaceTypeMetadata | - |
| MutationMetadata | - |
| MutationOptions | Options for the |
| ObjectTypeMetadata | - |
| ParentMetadata | @Parent/Root metadata. |
| QueryMetadata | - |
| QueryOptions | Options for the |
| ResolverMetadata | - |
| ResolverOptions | Options for the |
| ReturnTypeMetadata | - |
| ScalarMetadata | - |
| ScalarsTypeMap | Mapping between TypeScript types and GraphQL scalars. |
| SubscriptionMetadata | - |
| SubscriptionOptions | Options for the |
| UnionMetadata | - |
| UploadedFile | Represents an uploaded file in a GraphQL multipart request. Provides access to file metadata and streaming capabilities. |
| UploadOptions | Options for controlling file upload limits in a GraphQL multipart request. |
Type Aliases
| Type Alias | Description |
|---|---|
| DateScalarMode | Date scalar serialization mode. |
| GqlContextType | Type identifier for GraphQL context type. |
| NumberScalarMode | Number scalar serialization mode. |
| ParamMetadata | Union parameter metadata. |
| ResolveFn | Resolve function type for subscriptions. |
| SubscribeFn | Subscribe function type for subscriptions. |
| SubscriptionConfig | Subscription configuration supporting multiple protocols. |
Variables
| Variable | Description |
|---|---|
| ARGS_METADATA | Metadata key for |
| CONTEXT_METADATA | Metadata key for |
| Ctx | Alias for |
| DIRECTIVE_METADATA | Metadata key for |
| ENUM_METADATA | Metadata key for |
| FIELD_METADATA | Metadata key for |
| FIELD_RESOLVER_METADATA | Metadata key for |
| GQL_OPTIONS_METADATA | Metadata key for GraphQL options. |
| GqlExecutionContext | Utility for creating GraphQL execution contexts. Provides access to resolver arguments, context, and GraphQL-specific information. |
| GraphQLBigInt | GraphQL scalar for JavaScript bigint values. Serialized as a string to avoid precision loss. |
| GraphQLBoolean | The built-in Boolean scalar type. |
| GraphQLDateTime | GraphQL scalar that serializes JS Date to/from ISO 8601 strings. |
| GraphQLEmailAddress | GraphQL scalar for email address strings (basic RFC format validation). |
| GraphQLFloat | The built-in Float scalar type. |
| GraphQLID | The built-in ID scalar type. |
| GraphQLInt | The built-in Int scalar type. |
| GraphQLJSON | GraphQL scalar that accepts any JSON-serializable value. |
| GraphQLString | The built-in String scalar type. |
| GraphQLUpload | GraphQL scalar type for handling file uploads. Implements the GraphQL multipart request specification. |
| GraphQLURL | GraphQL scalar for validated URL strings. |
| GraphQLUUID | GraphQL scalar for UUID strings (any version, canonical lowercase format). |
| HIDDEN_FIELDS_METADATA | Metadata key for hidden fields. |
| INFO_METADATA | Metadata key for |
| INPUT_TYPE_METADATA | Metadata key for |
| INTERFACE_TYPE_METADATA | Metadata key for |
| MUTATION_METADATA | Metadata key for |
| OBJECT_TYPE_METADATA | Metadata key for |
| PARENT_METADATA | Metadata key for |
| QUERY_METADATA | Metadata key for |
| RESOLVER_METADATA | Metadata key for |
| RETURN_TYPE_METADATA | Metadata key for return type information. |
| Root | Alias for |
| SCALAR_METADATA | Metadata key for |
| SUBSCRIPTION_METADATA | Metadata key for |
| typeMetadataStorage | Global singleton instance of TypeMetadataStorage. Stored on globalThis to ensure a single instance across the application. |
| UNION_METADATA | Metadata key for |
References
FieldResolver
Renames and re-exports ResolveField