fix: modified graphql files in dashboard users and teams module to match resolver changes (#50)
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
committed by
GitHub
parent
3df0492275
commit
5164315243
@@ -10,6 +10,7 @@ export function usePagedQuery<
|
||||
query: string | TypedDocumentNode<Result, Vars> | DocumentNode,
|
||||
getList: (result: Result) => ListItem[],
|
||||
getCursor: (value: ListItem) => string,
|
||||
itemsPerPage: number,
|
||||
variables: Vars
|
||||
) {
|
||||
//Fetch All Users
|
||||
@@ -26,6 +27,7 @@ export function usePagedQuery<
|
||||
const result = await client
|
||||
.query(query, {
|
||||
...variables,
|
||||
take: itemsPerPage,
|
||||
cursor:
|
||||
list.value.length > 0 ? getCursor(list.value.at(-1)) : undefined,
|
||||
})
|
||||
@@ -33,7 +35,7 @@ export function usePagedQuery<
|
||||
|
||||
const resultList = getList(result.data!);
|
||||
|
||||
if (resultList.length < 20) {
|
||||
if (resultList.length < itemsPerPage) {
|
||||
hasNextPage.value = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user