Function: createFragment

createFragment<TKey>(fragment, key): DataProxy<KeyTypeData<TKey>>

Type parameters

Name Type
TKey extends Readonly<{ $data?: unknown ; $fragmentSpreads: unknown }>

Parameters

Name Type
fragment GraphQLTaggedNode
key Accessor<TKey>

Returns

DataProxy<KeyTypeData<TKey>>

createFragment<TKey>(fragment, key): DataProxy<KeyTypeData<TKey> | null | undefined>

Type parameters

Name Type
TKey extends Readonly<{ $data?: unknown ; $fragmentSpreads: unknown }>

Parameters

Name Type
fragment GraphQLTaggedNode
key Accessor<undefined | null | TKey>

Returns

DataProxy<KeyTypeData<TKey> | null | undefined>