Skip to content

Commit 7e92253

Browse files
feat: error in parseCurserArgs function
1 parent c3978f8 commit 7e92253

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/relay.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,9 @@ function parseCurserArgs(options: ResolveOffsetConnectionOptions) {
136136
const defaultSize = options.defaultSize ?? DEFAULT_SIZE
137137
const maxSize = options.maxSize ?? DEFAULT_MAX_SIZE
138138

139+
if (before && after)
140+
throw new Error('Arguments "before" and "after" cannot be used together')
141+
139142
if (first != null && first < 0)
140143
throw new Error('Argument "first" must be a non-negative integer')
141144

0 commit comments

Comments
 (0)