Skip to content

Commit c0b00ab

Browse files
committed
Also allow undefined
1 parent 5c34b76 commit c0b00ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/usePagination.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ export function usePagination<TQuery extends OperationType, TKey extends KeyType
1414
): ReturnTypePagination<TQuery, TKey, KeyTypeData<TKey>>;
1515
export function usePagination<TQuery extends OperationType, TKey extends KeyType>(
1616
fragmentNode: GraphQLTaggedNode,
17-
fragmentRef: TKey | null,
17+
fragmentRef: TKey | null | undefined,
1818
): ReturnTypePagination<TQuery, TKey | null, KeyTypeData<TKey> | null>;
1919
export function usePagination<TQuery extends OperationType, TKey extends KeyType>(
2020
fragmentNode: GraphQLTaggedNode,
21-
fragmentRef: TKey | null,
21+
fragmentRef: TKey | null | undefined,
2222
): ReturnTypePagination<TQuery, TKey | null, KeyTypeData<TKey> | null> {
2323
const [data] = useOssFragment(fragmentNode, fragmentRef, false, PAGINATION_NAME);
2424
return data;

0 commit comments

Comments
 (0)