File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4,8 +4,12 @@ import { ResolverContextBase } from '../../types/graphql';
44const 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 */
1014export function getEventsFactory ( context : ResolverContextBase , projectId : string ) {
1115 const cache = context && context . eventsFactoryCache ;
You can’t perform that action at this time.
0 commit comments