Skip to content

Commit

Permalink
resolvers: put a default "max limit" for users & comments as similar …
Browse files Browse the repository at this point in the history
…as posts
  • Loading branch information
xavxyz committed Feb 17, 2017
1 parent 1e416fd commit 439478d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/nova-comments/lib/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const resolvers = {
resolver(root, {terms}, context) {
let {selector, options} = context.Comments.getParameters(terms);

options.limit = (terms.limit < 1 || terms.limit > 10) ? 10 : terms.limit;
options.limit = (terms.limit < 1 || terms.limit > 100) ? 100 : terms.limit;
options.skip = terms.offset;
options.fields = context.getViewableFields(context.currentUser, context.Comments);

Expand Down
2 changes: 1 addition & 1 deletion packages/nova-users/lib/resolvers.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const resolvers = {
resolver(root, {terms}, context, info) {
let {selector, options} = context.Users.getParameters(terms);

options.limit = (terms.limit < 1 || terms.limit > 10) ? 10 : terms.limit;
options.limit = (terms.limit < 1 || terms.limit > 100) ? 100 : terms.limit;
options.skip = terms.offset;
options.fields = context.getViewableFields(context.currentUser, context.Users);

Expand Down

0 comments on commit 439478d

Please sign in to comment.