Skip to content
module@warp-drive/schema-dsl

Defined in: fields/has-many.ts:10

Options accepted by the hasMany decorator.

Properties

as?

ts
optional as?: string;

Defined in: fields/has-many.ts:49

If this field is polymorphic, the trait or abstract type that this resource implements.


async?

ts
optional async?: boolean;

Defined in: fields/has-many.ts:32

Whether the relationship is async. Compiles onto the LegacyHasManyField's options.async, defaulting to false.


inverse

ts
inverse: string | null;

Defined in: fields/has-many.ts:24

The name of the inverse field on the related resources, or null if the relationship is unidirectional.


polymorphic?

ts
optional polymorphic?: boolean;

Defined in: fields/has-many.ts:41

Whether this field satisfies a polymorphic relationship on another resource, meaning it can point to multiple types of resources so long as they implement the trait or abstract type named by type.


sourceKey?

ts
optional sourceKey?: string;

Defined in: fields/has-many.ts:57

The name of the field as returned by the API, if it differs from the decorated property's name.


type

ts
type: string;

Defined in: fields/has-many.ts:16

The name of the related resources' type.

Released under the MIT License.