JS Party: JavaScript, CSS, Web Development cover image

The ORMazing show

JS Party: JavaScript, CSS, Web Development

00:00

GraphQL Context Parameters for Entity Managers

So when we boot up our GraphQL server, it's going to ask for a fast-to-wide request entity. And that's where we're like, oh, okay, this is a new request. Let's make a new entity manager. So you could do, actually, we do that first. We've got middleware that first sets like request.context. Some pastify handlers also have access to the request context and hence the entity manager if they wanted to do anything. But then most of our stuff ends up being GraphQL mutations that then, you know, uses that context parameter to get the entity manager out of the request contexts and do any loads or do any saves

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app