diff --git a/src/datasources/db/contactinformationAPI.ts b/src/datasources/db/contactinformationAPI.ts index d89f9d6..3cffd2a 100644 --- a/src/datasources/db/contactinformationAPI.ts +++ b/src/datasources/db/contactinformationAPI.ts @@ -78,7 +78,7 @@ export class ContactInformationAPI extends DataSource { .select() .skip(offset) .take(limit) - .execute(); + .getMany(); } async personById (id: number) { diff --git a/src/datasources/db/utils.ts b/src/datasources/db/utils.ts index 88a4f55..272844c 100644 --- a/src/datasources/db/utils.ts +++ b/src/datasources/db/utils.ts @@ -83,11 +83,8 @@ export class LockUtils { }) .where('id = :id', { id: id }) .execute(); - return await this.findById(connection, target, alias, id); - } else { - // lock was set - throw new GraphQLError('Entry locked by other user'); } + return await this.findById(connection, target, alias, id); } static async unlockEntity (connection: Connection, target: ObjectType, alias: string, id: number, userId: number): Promise {