diff --git a/packages/client/src/utils/fetch/QueryFetch.js b/packages/client/src/utils/fetch/QueryFetch.js index 06f86dee5b..76aca2a855 100644 --- a/packages/client/src/utils/fetch/QueryFetch.js +++ b/packages/client/src/utils/fetch/QueryFetch.js @@ -18,7 +18,9 @@ export default class QueryFetch extends DataFetch { } 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. - definition.fields = datasource.fields + if (!definition.fields) { + definition.fields = datasource.fields + } return definition }