Fix types

This commit is contained in:
Adria Navarro 2025-01-07 12:06:37 +01:00
parent 8c0e7a12d6
commit f4ed2176c9
2 changed files with 5 additions and 1 deletions

View File

@ -83,7 +83,7 @@ export default class QueryFetch extends DataFetch<QueryDatasource, Query> {
if (paginate && supportsPagination) {
if (type === "page") {
// For "page number" pagination, increment the existing page number
nextCursor = queryPayload.pagination.page + 1
nextCursor = queryPayload.pagination!.page! + 1
hasNextPage = data?.length === limit && limit > 0
} else {
// For "cursor" pagination, the cursor should be in the response

View File

@ -40,6 +40,10 @@ export interface ExecuteQueryRequest {
export type ExecuteV1QueryResponse = Record<string, any>[]
export interface ExecuteV2QueryResponse {
data: Record<string, any>[]
pagination?: {
page: number
cursor: string
}
}
export interface DeleteQueryResponse {