Browse Source
Merge pull request #4228 from pueding/fix/query-pagination-on-production
Fix not showing pagination of query on production
master
Andrew Kingston
5 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
6 additions and
1 deletions
packages/client/src/utils/fetch/QueryFetch.js
@ -16,7 +16,12 @@ export default class QueryFetch extends DataFetch {
if ( ! datasource ? . _ id ) {
return null
}
return await fetchQueryDefinition ( datasource . _ id )
const definition = await fetchQueryDefinition ( datasource . _ id )
// After getting the definition of query, it loses "fields" attribute because of security reason from the server. However, this attribute needs to be inside of defintion for pagination.
if ( ! definition . fields ) {
definition . fields = datasource . fields
}
return definition
}
async getData ( ) {