Skip to content

Commit

Permalink
Extract ApolloServerPluginUsageReporting from EngineReportingAgent
Browse files Browse the repository at this point in the history
Remove apollo-engine-reporting package entirely.

There was a function handleLegacyOptions which handled two specific
options (privateHeaders and privateVariables); rewrite it as
legacyOptionsToPluginOptions which turns *all* of the (still exported)
EngineReportingOptions into ApolloServerPluginUsageReportingOptions. This also
includes normalizing maskErrorDetails which used to happen in the ApolloServer
constructor.

Note that if you are using the overrideReportedSchema option to
ApolloServerPluginSchemaReporting, you need to make sure to pass the same option
to ApolloServerPluginUsageReporting. That will ensure that links from traces to
their schemas (when implemented in Studio) work properly. (If this turns out to
be a huge hassle we can incorporate it into the plugin API but I'm not sure if
anyone is actually using this option.)

We no longer warn if you configure usage reporting (explicitly via
ApolloServerPluginUsageReporting or implicitly by setting an API key) with a
schema that appears to be a federated implementing service. (This may be an
explicitly supported mode of operation as managed federation evolves.)

I changed the signature cache to use `lru-cache` directly instead of
InMemoryLRUCache; the main difference is that the APIs are not async
functions (which in InMemoryLRUCache's case always return synchronously
anyway). If we later allow the cache to be customized we can always make it
async again.
  • Loading branch information
glasser committed Aug 25, 2020
1 parent 14c82ab commit dd2e81f
Show file tree
Hide file tree
Showing 44 changed files with 2,149 additions and 2,632 deletions.
72 changes: 3 additions & 69 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"apollo-cache-control": "file:packages/apollo-cache-control",
"apollo-datasource": "file:packages/apollo-datasource",
"apollo-datasource-rest": "file:packages/apollo-datasource-rest",
"apollo-engine-reporting": "file:packages/apollo-engine-reporting",
"apollo-federation-integration-testsuite": "file:packages/apollo-federation-integration-testsuite",
"apollo-reporting-protobuf": "file:packages/apollo-reporting-protobuf",
"apollo-server": "file:packages/apollo-server",
Expand Down
6 changes: 0 additions & 6 deletions packages/apollo-engine-reporting/.npmignore

This file was deleted.

10 changes: 0 additions & 10 deletions packages/apollo-engine-reporting/CHANGELOG.md

This file was deleted.

6 changes: 0 additions & 6 deletions packages/apollo-engine-reporting/README.md

This file was deleted.

3 changes: 0 additions & 3 deletions packages/apollo-engine-reporting/jest.config.js

This file was deleted.

27 changes: 0 additions & 27 deletions packages/apollo-engine-reporting/package.json

This file was deleted.

161 changes: 0 additions & 161 deletions packages/apollo-engine-reporting/src/__tests__/agent.test.ts

This file was deleted.

Loading

0 comments on commit dd2e81f

Please sign in to comment.