> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wyrly.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Public API

> Stable public exports for Wyrly DI v2.2.

This page summarizes the stable public API surface for Wyrly DI v2.2.

Anything not listed in the repository's `API.md` is not part of the semver guarantee, including
internal modules and deep imports.

## `@wyrly/core`

Core entrypoint:

```ts theme={null}
import { createContainer, Injectable, token } from "@wyrly/core";
```

Common exports:

| Export            | Purpose                                               |
| ----------------- | ----------------------------------------------------- |
| `token`           | Create a typed injection token                        |
| `Injectable`      | Standard decorator for explicit `deps` and `lifetime` |
| `createContainer` | Create the root DI container                          |
| `graphToJson`     | Serialize a dependency graph to JSON                  |
| `graphToDot`      | Serialize a dependency graph to DOT                   |
| `graphToMermaid`  | Serialize a dependency graph to Mermaid               |

Core types include:

* `Token`
* `ClassToken`
* `InjectionToken`
* `Lifetime`
* `Container`
* `Scope`
* `Provider`
* `DependencyGraph`
* `ValidationResult`

## Adapter packages

| Package          | Key exports                                                             |
| ---------------- | ----------------------------------------------------------------------- |
| `@wyrly/express` | `diMiddleware`, `ExpressRequestToken`, `ExpressResponseToken`           |
| `@wyrly/hono`    | `di`, `getDI`, `HonoContextToken`, `RequestToken`                       |
| `@wyrly/fresh`   | `di`, `withDI`, `FreshContextToken`, `RequestToken`                     |
| `@wyrly/graphql` | `createGraphQLDIContext`, `GraphQLRequestToken`, `GraphQLResponseToken` |
| `@wyrly/next`    | `withDI`, `withActionDI`, `createServerDI`, `NextRequestToken`          |
| `@wyrly/fastify` | `diPlugin`, `getDI`, `FastifyRequestToken`, `FastifyReplyToken`         |
| `@wyrly/yoga`    | `yogaDIPlugin`, `yogaContext`, `createYogaDIContext`                    |
| `@wyrly/apollo`  | `apolloDIPlugin`, `createApolloDIContext`, `toFetchRequest`             |

## Full API list

The full public API list lives in the repository:

[API.md](https://github.com/valid-lab/wyrly/blob/main/API.md)
