diff --git a/src/datasources/db/participantAPI.ts b/src/datasources/db/participantAPI.ts index ce01f09..bd16bcf 100644 --- a/src/datasources/db/participantAPI.ts +++ b/src/datasources/db/participantAPI.ts @@ -25,7 +25,6 @@ import { Participant } from '../../model/Participant'; import { EngagementType } from '../../model/EngagementType'; import { ActionLogger, DBUtils, genDateRange, LockUtils } from './utils'; import { UserInputError } from 'apollo-server-express'; -import { GraphQLError } from 'graphql'; import { ResourceLockedError } from '../../errors/ResourceLockedError'; export class ParticipantAPI extends DataSource { diff --git a/src/resolvers/cargoBikeResolver.ts b/src/resolvers/cargoBikeResolver.ts index e6e067e..0d56bb9 100644 --- a/src/resolvers/cargoBikeResolver.ts +++ b/src/resolvers/cargoBikeResolver.ts @@ -215,7 +215,7 @@ export default { }, related (parent: any, __: any, { dataSources, req }: { dataSources: any, req: any }) { if (req.permissions.includes(Permission.ReadParticipant)) { - return dataSources.cargoBikeAPI.relatedByBikeEventId(parent.workshopTypeId); + return dataSources.cargoBikeAPI.relatedByBikeEventId(parent.id); } else { throw new PermissionError(); }