Skip to content

Commit 6396938

Browse files
committed
Remove deprecation warning
It's a bit overkill. New plan is not to make "key but no ref" an error in AS3 but just have it log a line noting that usage reporting is not automatically installed.
1 parent c8c0748 commit 6396938

File tree

2 files changed

+0
-10
lines changed

2 files changed

+0
-10
lines changed

CHANGELOG.md

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ The version headers in this history reflect the versions of Apollo Server itself
1414
## v2.25.0
1515

1616
- `apollo-server-core`: You may now specify your Studio graph as a graph ref (`id@variant`) via the `APOLLO_GRAPH_REF` environment variable or `new ApolloServer({apollo: {graphRef}})` instead of specifying graph ID and graph variant separately. The `apollo` object passed to plugin `serverWillStart` and to gateway `load` now contains a `graphRef` field.
17-
- `apollo-server-core`: If you specify an Apollo key but do not specify a graph ID or graph ref, a deprecation warning is logged. The behavior where your graph ID can be inferred from the structure of your API key will be removed in Apollo Server 3.
1817
- `apollo-server-core`: Fix a race condition where schema reporting could lead to a delay at process shutdown. [PR #5222](https://github.com/apollographql/apollo-server/pull/5222)
1918
- `apollo-server-core`: Allow the Fetch API implementation to be overridden for the schema reporting and usage reporting plugins via a new `fetcher` option. [PR #5179](https://github.com/apollographql/apollo-server/pull/5179)
2019
- `apollo-server-core`: The `server.executeOperation` method (designed for testing) can now take its `query` as a `DocumentNode` (eg, a `gql`-tagged string) in addition to as a string. (This matches the behavior of the `apollo-server-testing` `createTestClient` function which is now deprecated.) We now recommend this method instead of `apollo-server-testing` in our docs. [Issue #4952](https://github.com/apollographql/apollo-server/issues/4952)

packages/apollo-server-core/src/determineApolloConfig.ts

-9
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,13 @@ export function determineApolloConfig(
128128
apolloConfig.graphVariant = apolloConfig.graphRef.substring(at + 1);
129129
}
130130
} else {
131-
let usedKeyParser = false;
132131
// Graph ref not specified. Let's try harder to get ID/variant, then join them.
133132
if (!apolloConfig.graphId && apolloConfig.key) {
134133
// If the given key is a graph token (starts with 'service:'), then use the
135134
// service name written in the key. (We will remove this parser in AS3.)
136135
const parts = apolloConfig.key.split(':', 2);
137136
if (parts[0] === 'service') {
138137
apolloConfig.graphId = parts[1];
139-
usedKeyParser = true;
140138
} else {
141139
throw Error(
142140
'You have specified an API key in `apollo.key` or `APOLLO_KEY`, ' +
@@ -152,13 +150,6 @@ export function determineApolloConfig(
152150

153151
if (apolloConfig.graphId) {
154152
apolloConfig.graphRef = `${apolloConfig.graphId}@${apolloConfig.graphVariant}`;
155-
if (usedKeyParser) {
156-
logger.warn(
157-
'Deprecation warning: Setting your graph ref based on parsing your API key. ' +
158-
'API key parsing will be removed in Apollo Server 3. To be compatible with ' +
159-
`Apollo Server 3, set \`APOLLO_GRAPH_REF\` to '${apolloConfig.graphRef}'.`,
160-
);
161-
}
162153
}
163154
}
164155

0 commit comments

Comments
 (0)