Update client query fetch to better determine whether pagination is supported or not

This commit is contained in:
Andrew Kingston 2022-01-07 11:03:55 +00:00
parent 54ad2237ea
commit e187e8f2b1
1 changed files with 3 additions and 2 deletions

View File

@ -6,8 +6,9 @@ import { get } from "svelte/store"
export default class QueryFetch extends DataFetch { export default class QueryFetch extends DataFetch {
determineFeatureFlags(definition) { determineFeatureFlags(definition) {
const supportsPagination = const supportsPagination =
definition?.fields?.pagination?.type != null && !!definition?.fields?.pagination?.type &&
definition?.fields?.pagination?.pageParam != null !!definition?.fields?.pagination?.location &&
!!definition?.fields?.pagination?.pageParam
return { supportsPagination } return { supportsPagination }
} }