Function: createRefetchableFragment

createRefetchableFragment<TQuery, TKey>(fragment, key): [DataProxy<KeyTypeData<TKey>>, RefetchFnDynamic<TQuery, TKey>]

Type parameters

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

Parameters

Name Type
fragment GraphQLTaggedNode
key Accessor<TKey>

Returns

[DataProxy<KeyTypeData<TKey>>, RefetchFnDynamic<TQuery, TKey>]

createRefetchableFragment<TQuery, TKey>(fragment, key): [DataProxy<KeyTypeData<TKey> | null | undefined>, RefetchFnDynamic<TQuery, TKey>]

Type parameters

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

Parameters

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

Returns

[DataProxy<KeyTypeData<TKey> | null | undefined>, RefetchFnDynamic<TQuery, TKey>]