-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: restore allow setting engine: false
to ignore env var
#2850
Conversation
@@ -87,7 +87,8 @@ function getEngineApiKey(engine: Config['engine']): string | undefined { | |||
|
|||
function getEngineServiceId(engine: Config['engine']): string | undefined { | |||
const engineApiKey = getEngineApiKey(engine); | |||
if (engineApiKey) { | |||
|
|||
if (engine !== false && engineApiKey) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this logic should be in getEngineApiKey?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indeed, fixed
2e60f4f
to
c91f835
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oops, missed that this was blocked on me
CHANGELOG.md
Outdated
@@ -10,6 +10,7 @@ | |||
- `apollo-federation`: Deduplicate variable definitions for subqueries [PR #2840](https://github.com/apollographql/apollo-server/pull/2840) | |||
- `apollo-federation`: Preserve docstrings in SDL of federated services. [PR #2830](https://github.com/apollographql/apollo-server/pull/2830) | |||
- `apollo-engine-reporting`: Set `forbiddenOperation` and `registeredOperation` later in the request lifecycle [PR #2828](https://github.com/apollographql/apollo-server/pull/2828) | |||
- `apollo-server-core`: Bug fix: Setting `engine: false` should ignore `ENGINE_API_KEY` in environment variable [PR #2850](https://github.com/apollographql/apollo-server/pull/2850) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
although the changelog should note that this was a regression introduced in 2.6.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, good idea, will add!
c046802
to
639476a
Compare
Followup to fix unintended side effect of #2685 that David discovered where setting
engine: false
would no longer ignore theENGINE_API_KEY
environment variable