DependencyInterface.schema property

The built schema used to turn a class into its GraphQL type.

Signature:

schema?: GraphQLSchema;

Remarks

Set automatically by the first 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 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.

Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.