Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extract ApolloServerPluginUsageReporting from EngineReportingAgent
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.) Instead, we *always* log an info line if ApolloServerPluginUsageReporting is operating. 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