Skip to content

Function: viewFor() ​

viewFor<V, Type>(type, view): Readonly<Record<TypeBranchKey, TypeBranchSelection<Type>>>

Defined in: fate/src/viewFor.ts:18

Compose a view when a GraphQL result has the given concrete typename.

Type Parameters ​

V ​

V extends View<any, any>

Type ​

Type extends any

Parameters ​

type ​

Type

view ​

V & (ViewEntityName<V> extends NoInfer<Type> ? unknown : never)

Returns ​

Readonly<Record<TypeBranchKey, TypeBranchSelection<Type>>>

Released under the MIT License