Skip to content
@legacy

Documentation / @warp-drive/legacy / model-fragments / withFragmentArrayDefaults

Function: withFragmentArrayDefaults()

ts
function withFragmentArrayDefaults<FragmentArrayType, FragmentArrayName>(fragmentArrayType, fragmentArrayName?): object;

Defined in: warp-drive-packages/legacy/src/model-fragments/utilities/with-fragment-array-defaults.ts:11

Used as a helper to setup the relevant parts of a fragment-array schema and add extensions etc.

Type Parameters

FragmentArrayType

FragmentArrayType extends string

FragmentArrayName

FragmentArrayName extends string

Parameters

fragmentArrayType

FragmentArrayType

The type of the fragment-array

fragmentArrayName?

FragmentArrayName

The name of the fragment-array

Returns

object

The schema for a fragment-array

kind

ts
kind: "schema-array";

name

ts
name: string;

options

ts
options: object;

options.arrayExtensions

ts
arrayExtensions: string[];

options.defaultValue

ts
defaultValue: boolean;

type

ts
type: `fragment:${string}`;

Released under the MIT License.