Skip to content

Commit

Permalink
feat: error in parseCurserArgs function
Browse files Browse the repository at this point in the history
  • Loading branch information
productdevbook committed Nov 7, 2023
1 parent c3978f8 commit 7e92253
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/relay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,9 @@ function parseCurserArgs(options: ResolveOffsetConnectionOptions) {
const defaultSize = options.defaultSize ?? DEFAULT_SIZE
const maxSize = options.maxSize ?? DEFAULT_MAX_SIZE

if (before && after)
throw new Error('Arguments "before" and "after" cannot be used together')

if (first != null && first < 0)
throw new Error('Argument "first" must be a non-negative integer')

Expand Down

0 comments on commit 7e92253

Please sign in to comment.