Skip to content

Commit

Permalink
simplify drizzle query by removing offset option
Browse files Browse the repository at this point in the history
  • Loading branch information
hayes committed Dec 28, 2024
1 parent 798c94b commit 5706d80
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/plugin-drizzle/src/drizzle-field-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ export class DrizzleObjectFieldBuilder<
let typeName: string | undefined;

const getQuery = (args: PothosSchemaTypes.DefaultConnectionArguments, ctx: {}) => {
const { limit, offset, orderBy, where, ...fieldQuery } =
const { limit, orderBy, where, ...fieldQuery } =
(typeof query === 'function' ? query(args, ctx) : query) ?? {};

const { cursorColumns, columns, ...connectionQuery } = drizzleCursorConnectionQuery({
Expand All @@ -231,7 +231,6 @@ export class DrizzleObjectFieldBuilder<
...columns,
},
limit: Math.abs(limit ?? connectionQuery.limit),
offset: offset ?? connectionQuery.offset,
},
cursorColumns,
};
Expand Down

0 comments on commit 5706d80

Please sign in to comment.