Confusion in initialising GraphQL Dataloader in context

Confusion in initialising GraphQL Dataloader in context


0

context: ({ req }) => { if (req) { return { ip: headers.userip, headers, userLanguage, decodedToken, dataLoaders: { seoDataLoader: createSeoDataLoader() } } } }
Here I create a createSeoDataLoader instace for every request . now suppose if i have 50 loaders then for every request 50 loaders instance created and i think its not good. please anyone give me some clairification about this thing. thanks

at every request create a instance of all 50 dataloader is it good or not ?. i need to figureout this thing please help me.

Share

New contributor

Jay Karavadra is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


Load 7 more related questions


Show fewer related questions

0

Reset to default



Leave a Reply

Your email address will not be published. Required fields are marked *