@ethlete/query 0.1.0-next.22 → 0.1.0-next.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -576,7 +576,7 @@ class Query {
576
576
  body = query(this._args?.variables);
577
577
  }
578
578
  else {
579
- body = serializeBody(this._args?.body);
579
+ body = this._args?.body;
580
580
  }
581
581
  let authHeader = null;
582
582
  if (this._queryConfig.secure) {
@@ -1019,6 +1019,10 @@ class InfinityQuery {
1019
1019
  totalPages: this.totalPages,
1020
1020
  itemsPerPage: this.itemsPerPage,
1021
1021
  }) ?? newPage;
1022
+ if (this.totalPages !== null && calculatedPage > this.totalPages) {
1023
+ console.error('Cannot load more pages, already at the end. Make sure to not render the infinity query trigger using *ngIf canLoadMore');
1024
+ return;
1025
+ }
1022
1026
  const args = this._prepareArgs(this._config, calculatedPage);
1023
1027
  const query = this._config.queryCreator.prepare(args).execute();
1024
1028
  this._handleNewQuery(query);