-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Automatic schema reporting to Apollo Graph Manager (#4084)
This commit implements the new schema reporting protocol for Apollo Server's reporting facilities and can be enabled by providing a Graph Manager API key available from Apollo Graph Manager in the `APOLLO_KEY` environment variable *and* setting the `experimental_schemaReporting` option to `true` in the Apollo Server constructor options, like so: ```js const server = new ApolloServer({ typeDefs, resolvers, engine: { experimental_schemaReporting: true, /* Other existing options can remain the same. */ }, }); ``` When schema-reporting is enabled, Apollo server will send the running schema and server information to Apollo Graph Manager. The extra runtime information will be used to power _auto-promotion_ which will set a schema as active for a _variant_, based on the algorithm described in the [Preview documentation]. When enabled, a schema reporting interval is initiated by the `apollo-engine-reporting` agent. It will loop until the `ApolloServer` instance is stopped, periodically calling back to Apollo Graph Manager to send information. The life-cycle of this loop is managed by the reporting agent. Additionally, this commit deprecates `schemaHash` in metrics reporting in favor of using the same `executableSchemaId` used within this new schema reporting protocol. [Preview documentation]: https://github.com/apollographql/apollo-schema-reporting-preview-docs#automatic-promotion-in-apollo-graph-manager
- Loading branch information
Showing
13 changed files
with
920 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.