feat(connection): bring your own DB connection#458
Open
goldcaddy77 wants to merge 1 commit intomainfrom
Open
Conversation
4952275 to
5d1c8e3
Compare
islathehut
reviewed
Jun 8, 2021
| apolloConfig?: ApolloServerExpressConfig; | ||
| authChecker?: AuthChecker<T>; | ||
| autoGenerateFiles?: boolean; | ||
| connectionGetter?: (config: Config) => Connection | Promise<Connection>; |
Contributor
There was a problem hiding this comment.
I think I'd prefer this to either be a drop in Connection or for the input parameter to this function type be typeorm's ConnectionOptions.
Contributor
There was a problem hiding this comment.
Suggested change
| connectionGetter?: (config: Config) => Connection | Promise<Connection>; | |
| connectionGetter?: (options: ConnectionOptions) => Connection | Promise<Connection>; |
Suggested change
| connectionGetter?: (config: Config) => Connection | Promise<Connection>; | |
| connection?: Connection; |
Owner
Author
There was a problem hiding this comment.
Connection - in this case, there would be no way to reconnect in the case the server drops the DB connection, right? Is that ok?
ConnectionOptions - Server already allows you to pass ConnectionOptions: https://github.com/goldcaddy77/warthog/pull/458/files#R67 . Could you just use that? I figured you needed access to the raw connection to be able to mutate it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.