Fix types
This commit is contained in:
parent
8c0e7a12d6
commit
f4ed2176c9
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue