Require apollo-engine-reporting only if EngineReportingAgent used.#2305
Merged
Conversation
When getEngineServiceId does not return a truthy value, we can save memory and startup time by avoiding importing apollo-engine-reporting, which (among its other dependencies) imports the protobuf.js implementation.
abernix
approved these changes
Feb 12, 2019
4 tasks
abernix
pushed a commit
that referenced
this pull request
May 27, 2019
…#2324) * lazy load unused lambda packages in core * Style adjustments plus changes to account for other PRs with similar motives. The work in #2054 was designed in a way that, irregardless of the environment, the `graphql-upload` package would only be loaded if uploads were enabled. Therefore, the guard which checks `process.env.AWS_EXECUTION_ENV` should no longer be necessary. Additionally, we don't need to prefix our type-only variables with underscores, as that's not a style that we've otherwise adopted. * The work in this was mostly also implemented by #2305, #2304 and #2054, but the remaining subscriptions-transport-ws and unnecessary util.promisify imports are still super worth addressing. So, thank you!
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When
getEngineServiceIddoes not return a truthy value, we can save memory and startup time by avoiding importingapollo-engine-reporting, which (among its other dependencies) imports theprotobuf.jsimplementation.