From d1bf50b62f4ce98fb5928230223cc912287a94ba Mon Sep 17 00:00:00 2001 From: Kareem Medhat Date: Sun, 19 Nov 2023 21:11:59 +0200 Subject: [PATCH] fix formatting --- src/index.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/index.ts b/src/index.ts index e45bd8dc..a66a106b 100644 --- a/src/index.ts +++ b/src/index.ts @@ -44,7 +44,10 @@ export async function findManyCursorConnection< const skip = cursor ? 1 : undefined // Execute the underlying query operations - const results = await Promise.all([findMany({ cursor, take, skip }), hasRequestedField('totalCount') ? aggregate() : Promise.resolve(-1)]) + const results = await Promise.all([ + findMany({ cursor, take, skip }), + hasRequestedField('totalCount') ? aggregate() : Promise.resolve(-1), + ]) records = results[0] totalCount = results[1] @@ -65,7 +68,10 @@ export async function findManyCursorConnection< const skip = cursor ? 1 : undefined // Execute the underlying query operations - const results = await Promise.all([findMany({ cursor, take, skip }), hasRequestedField('totalCount') ? aggregate() : Promise.resolve(-1)]) + const results = await Promise.all([ + findMany({ cursor, take, skip }), + hasRequestedField('totalCount') ? aggregate() : Promise.resolve(-1), + ]) records = results[0] totalCount = results[1] @@ -79,10 +85,10 @@ export async function findManyCursorConnection< if (hasPreviousPage) records.shift() } else { // Execute the underlying query operations - const results = await Promise.all([ - hasRequestedField('edges') || hasRequestedField('nodes') ? findMany({}) : Promise.resolve([]), - hasRequestedField('totalCount') ? aggregate() : Promise.resolve(-1) - ]) + const results = await Promise.all([ + hasRequestedField('edges') || hasRequestedField('nodes') ? findMany({}) : Promise.resolve([]), + hasRequestedField('totalCount') ? aggregate() : Promise.resolve(-1), + ]) records = results[0] totalCount = results[1]