Skip to content

Commit

Permalink
Make the types easier to use, splitting into withPagination and `wi…
Browse files Browse the repository at this point in the history
…thPaginationNoCursor`
  • Loading branch information
tjenkinson committed Jan 31, 2024
1 parent f9f38bd commit 007ebcc
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 140 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,4 +181,4 @@ console.log(edgesWithRawCursor[0].rawCursor);

This can then be provided to `before`/`after` by wrapping the object with `rawCursor(object)`.

You can also omit the `cursorSecret` and `cursor` will not be generated.
You can also use `withPaginationNoCursor`, which takes the same input as `withPagination` excluding the `cursorSecret`, and `cursor` will not be generated.
2 changes: 1 addition & 1 deletion src/cursor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export async function resolveCursor({
if (typeof cursor === 'string') {
if (cursorSecret === null) {
throw new ErrUnexpected(
'String cursor not supported when no `cursorSecret` is provided',
'String cursor not supported with `withPaginationNoCursor`',
);
}
const res = await decryptCursor({
Expand Down
Loading

0 comments on commit 007ebcc

Please sign in to comment.