diff --git a/packages/slonik-dataloaders/src/utilities/batchQueries.ts b/packages/slonik-dataloaders/src/utilities/batchQueries.ts index 9488759d..a4250dee 100644 --- a/packages/slonik-dataloaders/src/utilities/batchQueries.ts +++ b/packages/slonik-dataloaders/src/utilities/batchQueries.ts @@ -5,7 +5,9 @@ import { type z, type ZodTypeAny } from 'zod'; * Uses UNION to batch multiple queries that have the same shape. * In contrast to using the `json_agg(row_to_json(t))` approach, * this has the benefit of using native type parsing and - * avoid the overhead of serializing and deserializing JSON. + * avoids the overhead of serializing and deserializing JSON. + * This approach also has the benefit that it is compatible with + * Slonik interceptors that validate the shape of the result set. */ export const batchQueries = async ( pool: CommonQueryMethods,