GraphQLDependency.create() method

Returns the dependency description for a GraphQL object type, creating and registering it the first time the type is seen.

Signature:

static create<TResultType>(type: GraphQLObjectType): GraphQLDependency<TResultType>;

Parameters

Parameter

Type

Description

type

GraphQLObjectType

the GraphQL object type to describe

Returns:

GraphQLDependency<TResultType>

the one description registered against type

Remarks

Use this, or the shorter Dependency alias, rather than new — the constructor is protected to make that the only option. The registry is global to the process and keyed by the GraphQLObjectType object itself, so any module asking about a type gets the same description, and two separately built types of the same name are two separate entries.

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