# DependencyInterface.schema property · @imqueue/type-graphql-dependency

Source: https://imqueue.org/api/type-graphql-dependency/latest/type-graphql-dependency.dependencyinterface.schema/
Published: 2026-07-31
Author: @imqueue maintainers (https://github.com/imqueue)
Package: @imqueue/type-graphql-dependency 3.0.3 — generated reference, not hand-written

The built schema used to turn a class into its GraphQL type.

**Signature:**

```typescript
schema?: GraphQLSchema;
```

## Remarks

Set automatically by the first [DependencyFor()](https://imqueue.org/api/type-graphql-dependency/latest/type-graphql-dependency.dependencyfor/) hook to run, so it is populated as a side effect of wiring rather than by configuration. Until then it is `undefined` and [Dependency](https://imqueue.org/api/type-graphql-dependency/latest/type-graphql-dependency.dependency/) throws — which is why a `Dependency()` call before the schema hooks have run cannot work, even though the schema itself may already exist.

Assignable, if an application needs to point it at a particular schema or reset it between schemas in a test.

