type-graphql-dataloader
type-graphql-dataloader copied to clipboard
Is Apollo required?
I am getting this error typeormGetConnection is undefined, and I am unsure why. The docs indicate that Apollo isn't required, but I am unsure if this is the because of this error.
If your application uses Apollo Server, pass ApolloServerLoaderPlugin() as a plugin when instantiating the server.
It is required to do what is done in ApolloServerLoaderPlugin() against each request's pre-call and post-call. Therefore, if apollo-server is used, just passing ApolloServerLoaderPlugin() as a plugin would suffice. Otherwise, calling ApolloServerLoaderPlugin.requestDidStart and ApolloServerLoaderPlugin.willSendResponse against each request might work.