Skip to content

Commit 8c6b8f3

Browse files
committed
jsdoc
1 parent 5d19395 commit 8c6b8f3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/resolvers/helpers/eventsFactory.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@ import { ResolverContextBase } from '../../types/graphql';
44
const EventsFactory = require('../../models/eventsFactory');
55

66
/**
7-
* Returns a request-scoped, per-project EventsFactory instance using context cache
8-
* Falls back to a fresh instance if cache is not available (shouldn't happen in normal flow)
7+
* Returns a per-request, per-project EventsFactory instance
8+
* Uses context.eventsFactoryCache to memoize by projectId
9+
*
10+
* @param {ResolverContextBase} context - resolver context
11+
* @param {string} projectId - project id to get EventsFactory instance for
12+
* @returns {EventsFactory} - EventsFactory instance bound to a specific project object
913
*/
1014
export function getEventsFactory(context: ResolverContextBase, projectId: string) {
1115
const cache = context && context.eventsFactoryCache;

0 commit comments

Comments
 (0)