When setting a default limit (global config) I expected to get a paginated response back. However I get a limited list of 10 items and no pagination. I have to specify a page query parameter in order for the pagination response to display.
Should we:
according to #114 I'm thinking about always sending a response with pagination by default
@zMotivat0r cool :) want some help?
Sure. I need to prioritize issues this week someday somehow :(
@zMotivat0r ahh man, too busy? Know the feeling :joy: no time for OSS
@zMotivat0r is this still something that needs attention? We have run into this and were wanting to dive in and help out.
I'm planning to return paginated values always by default with the option of fallback to what we have now, something like alwaysPaginate: false
alwaysPaginate would be a global config option I suppose?
@zMotivat0r is there a doc somewhere that goes over setting this up locally to contirbute? I've got docker-compose running and have done a yarn install but when I run yarn test I get ../../packages/crud/src/interceptors/crud-request.interceptor.ts:7:36 - error TS2307: Cannot find module '@nestjsx/crud-request/lib/request-query.parser'. Looks like tsconfig has aliases but they don't seem to map the lib directory in crud-request.
@jdguzman
https://github.com/nestjsx/crud/wiki#tests
alwaysPaginate would be a global config option I suppose?
yep
@zMotivat0r yeah ok the steps in that wiki are what I was following but I get resolution errors. I'll paste the output here, but is there a gitter or some other form of communication you prefer?
[18:55:43] jdg ~/dev…s-projects/crud ᚴ [master] $ yarn bootstrap
yarn run v1.9.4
$ npx lerna bootstrap
lerna notice cli v3.15.0
lerna info bootstrap root only
[1/4] 🔍 Resolving packages...
success Already up-to-date.
$ npx opencollective
Thanks for installing nestjsx 🙏
Please consider donating to our open collective
to help us maintain this package.
Number of contributors: 44
Number of backers: 5
Annual budget: $730
Current balance: $407
👉 Become a partner: https://opencollective.com/nestjsx/donate
✨ Done in 3.53s.
[19:37:41] jdg ~/dev…s-projects/crud ᚴ [master] $ yarn build
yarn run v1.9.4
$ yarn s build
$ npx nps build
nps is executing `build` : nps build.util && nps build.crud-request && nps build.crud && nps build.crud-typeorm
nps is executing `build.util` : npx lerna run build --scope @nestjsx/util
lerna notice cli v3.15.0
lerna info filter [ '@nestjsx/util' ]
lerna info Executing command in 1 package: "yarn run build"
lerna info run Ran npm script 'build' in '@nestjsx/util' in 3.7s:
$ npx rimraf ./lib
$ npx tsc -b
lerna success run Ran npm script 'build' in 1 package in 3.8s:
lerna success - @nestjsx/util
nps is executing `build.crud-request` : npx lerna run build --scope @nestjsx/crud-request
lerna notice cli v3.15.0
lerna info filter [ '@nestjsx/crud-request' ]
lerna info Executing command in 1 package: "yarn run build"
lerna info run Ran npm script 'build' in '@nestjsx/crud-request' in 3.7s:
$ npx rimraf ./lib
$ npx tsc -b
lerna success run Ran npm script 'build' in 1 package in 3.7s:
lerna success - @nestjsx/crud-request
nps is executing `build.crud` : npx lerna run build --scope @nestjsx/crud
lerna notice cli v3.15.0
lerna info filter [ '@nestjsx/crud' ]
lerna info Executing command in 1 package: "yarn run build"
lerna ERR! yarn run build exited 1 in '@nestjsx/crud'
lerna ERR! yarn run build stdout:
$ npx rimraf ./lib
$ npx tsc -b
src/interceptors/crud-request.interceptor.ts(7,36): error TS2307: Cannot find module '@nestjsx/crud-request/lib/request-query.parser'.
src/interfaces/crud-request.interface.ts(1,37): error TS2307: Cannot find module '@nestjsx/crud-request/lib/interfaces'.
src/interfaces/params-options.interface.ts(1,33): error TS2307: Cannot find module '@nestjsx/crud-request/lib/types/request-param.types'.
src/interfaces/query-options.interface.ts(5,8): error TS2307: Cannot find module '@nestjsx/crud-request/lib/types/request-query.types'.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
lerna ERR! yarn run build stderr:
error Command failed with exit code 1.
lerna ERR! yarn run build exited 1 in '@nestjsx/crud'
The script called "build.crud" which runs "npx lerna run build --scope @nestjsx/crud" failed with exit code 1 https://github.com/kentcdodds/nps/blob/v5.9.5/other/ERRORS_AND_WARNINGS.md#failed-with-exit-code
The script called "build" which runs "nps build.util && nps build.crud-request && nps build.crud && nps build.crud-typeorm" failed with exit code 1 https://github.com/kentcdodds/nps/blob/v5.9.5/other/ERRORS_AND_WARNINGS.md#failed-with-exit-code
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
@zMotivat0r I was able to get everything setup. Not sure what was happening but I trashed the repo and recloned and all was good. I'm going to look into putting a PR together for this.
Most helpful comment
according to #114 I'm thinking about always sending a response with pagination by default