Skip to content
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

Make communicating with Apollo's commercial products into ordinary plugins #4453

Merged
merged 35 commits into from
Sep 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
28791ef
Add serverWillStop lifecycle hook; call stop() on signals by default
glasser Aug 4, 2020
8e84306
Move basic configuration from engine to apollo
glasser Aug 4, 2020
3666138
Extract ApolloServerPluginSchemaReporting from EngineReportingAgent
glasser Aug 5, 2020
bbd41e6
Extract ApolloServerPluginInlineTrace from EngineReportingAgent
glasser Aug 5, 2020
0368842
Rename apollo-engine-reporting-protobuf to apollo-reporting-protobuf
glasser Aug 19, 2020
1bb4527
Extract ApolloServerPluginUsageReporting from EngineReportingAgent
glasser Aug 25, 2020
3349293
Update various random references to Engine
glasser Aug 26, 2020
4ca6339
Add `serverlessFramework` to ApolloServer and serverWillStart
glasser Aug 27, 2020
8e259ea
Use better-named export from apollo-graphql
glasser Aug 28, 2020
c9061b8
Don't import the main plugin code from core/ApolloServer.ts
glasser Aug 28, 2020
d7023f1
docs: random scattered changes
glasser Aug 28, 2020
ef36c8a
docs: document `apollo` option
glasser Sep 2, 2020
3210984
docs: ApolloServerPluginUsageReporting reference
glasser Sep 2, 2020
7e96c5a
docs: ApolloServerPluginSchemaReporting reference
glasser Sep 3, 2020
83d6c29
docs: ApolloServerPluginInlineTrace reference
glasser Sep 3, 2020
28af042
docs: migration guide
glasser Sep 3, 2020
5bbadd0
Document `plugins` in the ApolloServer API reference.
glasser Sep 11, 2020
cc9f243
docs: update data/errors to put rewriteError in plugins
glasser Sep 11, 2020
726f4da
Update CHANGELOG
glasser Sep 11, 2020
786bb75
docs: update federation/metrics
glasser Sep 11, 2020
a669591
docs: update monitoring/metrics
glasser Sep 11, 2020
dea18ce
Update operation registry plugin README
glasser Sep 11, 2020
f9bad52
Update URLs used to communicate with Apollo's servers
glasser Sep 14, 2020
3519009
Tentatively commit to this being released in 2.18
glasser Sep 14, 2020
2ab8ed0
Actually, let's not warn on `new ApolloServer({engine:...})`
glasser Sep 14, 2020
0679a02
Audit whole repo for 'engine' and 'graph manager'
glasser Sep 14, 2020
d852220
Update some integration tests to pass new arguments
glasser Sep 14, 2020
f946b3c
updates error when schema reporting is used with federation (#4567)
EverlastingBugstopper Sep 16, 2020
5fc9fe1
Clarify a behavior change in the default behavior for inline tracing
glasser Sep 17, 2020
850469c
Update two links added to errors on this branch to use shortlinks
EverlastingBugstopper Sep 18, 2020
dd5f752
CHANGELOG tweaks (break up into more bullets, other changes)
glasser Sep 18, 2020
5bf7d3e
Various feedback from @abernix code review
glasser Sep 18, 2020
191ce14
Move __internal_plugin_id__ to an internal type
glasser Sep 18, 2020
7a7c118
Change the default logger level to INFO
glasser Sep 18, 2020
a897b59
schema-reporting: Check if overrideReportedSchema is parsable/valid
glasser Sep 18, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,30 @@ The version headers in this history reflect the versions of Apollo Server itself

## v2.18.0

- `apollo-server-core`: When Apollo Server is configured with an Apollo API key, the URLs it uses to connect to Apollo's servers have changed. If the environment in which you run your servers requires you to explicitly allow connections by domain, you will need to add the new domain names. Usage reporting previously connected to https://engine-report.apollodata.com/ and now connects to https://usage-reporting.api.apollographql.com/; schema reporting previously connected to https://edge-server-reporting.api.apollographql.com/ and now connects to https://schema-reporting.api.apollographql.com/ . [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- Apollo Server's support for communicating with Apollo’s commercial products has been refactored into three separate plugins exported from `apollo-server-core` (for usage reporting, schema reporting, and inline tracing), configured using the standard `plugins` option. The `engine` option continues to work for backwards compatibility in the 2.x series; support for `engine` will be deprecated in Apollo Server 3.x. Full details are available in [the migration guide](https://www.apollographql.com/docs/apollo-server/migration-engine-plugins/). [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- To consistently support tracing, inline tracing is enabled by default on federated implementing services, even when an Apollo API key is provided. Previously it was not enabled when an API key was provided. You can disable it with `ApolloServerPluginInlineTraceDisabled`. [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- The `apollo-engine-reporting` npm package has been obsoleted and will no longer receive updates. [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- The `apollo-engine-reporting-protobuf` package has been renamed to `apollo-reporting-protobuf`. No new versions of the old package will be published. [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- Implementations of `ApolloServer` for serverless frameworks such as Lambda now override the `serverlessFramework()` method to return true. We have changed our own integrations, but other implementations that extend `ApolloServer` which need this behavior should do the same. Support for `engine.sendReportsImmediately` will be dropped in Apollo Server 3.x. [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- The `GraphQLServiceContext` type passed to the plugin serverWillStart method now contains `apollo` and `serverlessFramework` values. [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- `apollo-server-core` / `apollo-server-plugin-base`: The request pipeline plugin API now supports a `serverWillStop` lifecycle hook. [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- `apollo-server-core`: Previously, the usage reporting functionality registered one-shot handlers for the `SIGINT` and `SIGTERM` signals, which it used to send one final usage report before re-sending the signal to itself to continue shutdown. These signals handlers were installed by default if you enabled usage or schema reporting, and could be disabled by passing `engine.handleSignals: false`. Now, termination signal handling is the responsibility of Apollo Server as a whole rather than something specific to usage reporting. Apollo Server itself now registers these one-shot signal handlers, which trigger `ApolloServer.stop()`. This allows any plugin that implements the new `serverWillStop` callback to hook into shutdown logic, not just the usage reporting code. Similarly to before, these signal handlers are registered by default but can be disabled by via an option. We've changed the option name to `stopOnTerminationSignals: false` as it is more explicit about the behavior. [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- `apollo-server-core`: The default logger implementation (if you don't specify your own `logger` or specify `debug`) now logs at the INFO level instead of the WARN level. The main effect is on a few built-in plugins which log one INFO message at startup; if a custom plugin logs at the INFO level then those messages will be visible by default as well. [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- `apollo-server-core`: Parse and validate any schema passed via `overrideReportedSchema` to the schema reporting plugin, and throw accordingly on unparsable or invalid schemas.

- Using Apollo Server from TypeScript now requires TypeScript 3.8 due to the use of the `import type` and `export type` directives. (If this proves to be a major problem we can revert this choice, but it makes it easier for us to ensure that certain large dependencies are only loaded when needed.) [PR #4453](https://github.com/apollographql/apollo-server/pull/4453)

- Updated `@apollographql/graphql-playground-react` to 1.7.33 to include [an upstream fix](https://github.com/apollographql/graphql-playground/commit/1c102692bfbb717688827204186c15cb92629b3a). [PR #4550](https://github.com/apollographql/apollo-server/pull/4550)

## v2.17.0
Expand Down
4 changes: 2 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ The next version of Apollo Server is a principled implementation of a production
* Supports enterprise-scale traffic through integrated caching layers and efficient execution.
* Production teams have **tools and hooks for confidently running and monitoring their graph** in production.
* Graph and request lifecycles are well-documented and include detailed observability hooks for teams to set up monitoring.
* Apollo Server includes built-in support for Apollo Graph Manager.
* Apollo Server includes built-in support for Apollo Studio.
* A new request pipeline gives teams more control over request lifecycles, including validation, parsing, and error handling.

## How we get there
Expand Down Expand Up @@ -80,7 +80,7 @@ The work to accomplish these goals is grouped into the following work:
* **First-class support for subscriptions, `@defer`, and `@stream`:**
* Subscriptions
* Implement a WebSocket transport using the new transport interface described above.
* Support subscriptions in tracing data sent to Apollo Graph Manager.
* Support subscriptions in tracing data sent to Apollo Studio.
* Query planner support.
* `@defer` and `@stream`
* Support response streams in the HTTP transport.
Expand Down
4 changes: 4 additions & 0 deletions docs/gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,16 @@ module.exports = {
'api/apollo-server',
'api/apollo-federation',
'api/apollo-gateway',
'api/plugin/usage-reporting',
'api/plugin/schema-reporting',
'api/plugin/inline-trace',
'api/graphql-tools',
],
Appendices: [
'proxy-configuration',
'migration-two-dot',
'migration-file-uploads',
'migration-engine-plugins',
],
},
},
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api/apollo-gateway.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ example of using `ApolloGateway`, see [The gateway](/federation/gateway/).

* `serviceList`: `ServiceDefinition[]`

> **Do not provide this option if you are using [managed configuration](https://www.apollographql.com/docs/graph-manager/federation/#managed-configuration).** If you
> **Do not provide this option if you are using [managed configuration](https://www.apollographql.com/docs/studio/managed-federation/overview/).** If you
> are _not_ using managed configuration, this option is **required**.

An array representing the implementing services that the gateway will use
Expand Down
Loading