Skip to content

Commit

Permalink
Revert "Merge pull request #3855 from apollographql/release-2.12.0"
Browse files Browse the repository at this point in the history
This reverts commit dd898bb, reversing
changes made to 650f298.
  • Loading branch information
trevor-scheer committed Apr 13, 2020
1 parent bc9b3ec commit 22286e4
Show file tree
Hide file tree
Showing 63 changed files with 485 additions and 1,931 deletions.
16 changes: 8 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
# at https://hub.docker.com/r/circleci/node/.

# NODE: Note certain tests are currently being skipped for Node.js 6.
# NodeJS 6:
# executor: { name: oss/node, tag: '6' }
# steps:
# - common_test_steps
NodeJS 6:
executor: { name: oss/node, tag: '6' }
steps:
- common_test_steps

NodeJS 8:
executor: { name: oss/node, tag: '8' }
Expand Down Expand Up @@ -92,8 +92,8 @@ workflows:
version: 2
Build:
jobs:
# - NodeJS 6:
# <<: *common_non_publish_filters
- NodeJS 6:
<<: *common_non_publish_filters
- NodeJS 8:
<<: *common_non_publish_filters
- NodeJS 10:
Expand All @@ -104,15 +104,15 @@ workflows:
name: Package tarballs
<<: *common_non_publish_filters
requires:
# - NodeJS 6
- NodeJS 6
- NodeJS 8
- NodeJS 10
- NodeJS 12
- oss/dry_run:
name: Dry-run
<<: *common_publish_filters
requires:
# - NodeJS 6
- NodeJS 6
- NodeJS 8
- NodeJS 10
- NodeJS 12
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ The version headers in this history reflect the versions of Apollo Server itself
- _Nothing yet! Stay tuned._

### v2.12.1

- Revert everything from the `release-2.12.0` merge commit

### v2.12.0

> [See complete versioning details.](https://github.com/apollographql/apollo-server/commit/71a3863f59f4ab2c9052c316479d94c6708c4309)
Expand Down
34 changes: 3 additions & 31 deletions docs/source/api/apollo-gateway.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,13 @@ example of using `ApolloGateway`, see [The gateway](/federation/gateway/).
});
```

* `logger`: `Logger`

A logging implementation to be used in place of `console`. The implementation must provide the methods which satisfy the requirements of [the `Logger` interface](https://github.com/apollographql/apollo-server/blob/80a12d89ea1ae9a0892f4a81d9213eddf95ca965/packages/apollo-server-types/src/index.ts#L114-L121) (i.e. it must provide `debug`, `info`, `warn` and `error` methods). When a custom logger is provided, it will receive all levels of logging and it is up to the logger itself to determine how it wishes to handle each level. When a custom logger is _not_ provided, Gateway will default to outputting `warn` and `error` levels unless `debug: true` is specified, in which case it will output all log levels (i.e. `debug` through `error`).

Additionally, this `logger` will be made available on the `GraphQLRequestContext` and available to plugins. This allows a plugin to, e.g., augment the logger on a per-request basis within the `requestDidStart` life-cycle hook.

* `debug`: `Boolean`

If `true`, the gateway logs startup messages, along with the query plan for
each incoming request. The default value is `false`.

* `fetcher`: `typeof fetch`

When specified, overrides the default
[Fetch API](https://fetch.spec.whatwg.org/#fetch-api) implementation
which is used when communicating with downstream services. By default,
Expand All @@ -121,7 +115,7 @@ example of using `ApolloGateway`, see [The gateway](/federation/gateway/).
`fetcher: require('node-fetch')`) or different [default options for
`make-fetch-happen`](https://www.npmjs.com/package/make-fetch-happen#extra-options)
can be defined entirely. E.g.:

```javascript
const gateway = new ApolloGateway({
/* ... */
Expand All @@ -134,14 +128,6 @@ example of using `ApolloGateway`, see [The gateway](/federation/gateway/).
});
```

* `serviceHealthCheck`: `boolean`

When set to true, the gateway will issue a small query (`{ __typename }`) to
its downstream services on load and on schema update. On load, the gateway
will throw an error if any of the requests fail. On schema update, the
gateway will not roll over to the new schema or service configuration if any
of the requests fail, but it will try again at the next poll interval.

* `experimental_approximateQueryPlanStoreMiB`: `number`

> **This property is experimental.** It may be removed or change at any time, even within a patch release.
Expand All @@ -164,20 +150,6 @@ const server = new ApolloServer({
});
```

### `serviceHealthCheck`

Calling this function on the gateway will issue a small query (`{ __typename }`)
to each downstream service to ensure they are all responsive. This function
`throw`s on failure and returns a `Promise` to be `await`ed.

#### Parameters

* `serviceMap`: `DataSourceMap`

A map of data sources can optionally be provided to this function in order to
modify where the health checks will be issued. By default, the gateway will
use the existing `this.serviceMap` for issuing the health check requests.

## `RemoteGraphQLDataSource`

A `RemoteGraphQLDataSource` object represents a connection between your
Expand Down
10 changes: 0 additions & 10 deletions docs/source/api/apollo-server.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,6 @@ new ApolloServer({
| AWS Lambda | <code>{<br/>&nbsp;&nbsp;event: [`APIGatewayProxyEvent`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/50adc95acf873e714256074311353232fcc1b5ed/types/aws-lambda/index.d.ts#L78-L92),<br/>&nbsp;&nbsp;context: [`LambdaContext`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/50adc95acf873e714256074311353232fcc1b5ed/types/aws-lambda/index.d.ts#L510-L534)<br/>}</code> |
| Micro | <code>{ req: [`MicroRequest`](https://github.com/apollographql/apollo-server/blob/c356bcf3f2864b8d2fcca0add455071e0606ef46/packages/apollo-server-micro/src/types.ts#L3-L5), res: [`ServerResponse`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/50adc95acf873e714256074311353232fcc1b5ed/types/node/v10/http.d.ts#L145-L158) }</code> |

* `logger`: `Logger`

A logging implementation to be used in place of `console`. The implementation must provide the methods which satisfy the requirements of [the `Logger` interface](https://github.com/apollographql/apollo-server/blob/80a12d89ea1ae9a0892f4a81d9213eddf95ca965/packages/apollo-server-types/src/index.ts#L114-L121) (i.e. it must provide `debug`, `info`, `warn` and `error` methods). When a custom logger is provided, it will receive all levels of logging and it is up to the logger itself to determine how it wishes to handle each level. When a custom logger is _not_ provided, Apollo Server will default to outputting `warn` and `error` levels unless `debug: true` is specified, in which case it will output all log levels (i.e. `debug` through `error`).

Additionally, this `logger` will be made available on the `GraphQLRequestContext` and available to plugins. This allows a plugin to, e.g., augment the logger on a per-request basis within the `requestDidStart` life-cycle hook.

* `rootValue`: <`Any`> | <`Function`>

A value or function called with the parsed `Document`, creating the root value passed to the graphql executor. The function is useful if you wish to provide a different root value based on the query operation type.
Expand Down Expand Up @@ -343,10 +337,6 @@ addMockFunctionsToSchema({
a service. You can also specify an API key with the `ENGINE_API_KEY`
environment variable, although the `apiKey` option takes precedence.
* `logger`: `Logger`
By default, this will inherit from the `logger` provided to `ApolloServer` which defaults to `console` when not provided. If specified within the `EngineReportingOptions` it can be used to send engine reporting to a separate logger. If provided, the implementation must provide the methods which satisfy the requirements of [the `Logger` interface](https://github.com/apollographql/apollo-server/blob/80a12d89ea1ae9a0892f4a81d9213eddf95ca965/packages/apollo-server-types/src/index.ts#L114-L121) (i.e. it must provide `debug`, `info`, `warn` and `error` methods).
* `calculateSignature`: (ast: DocumentNode, operationName: string) => string
Specify the function for creating a signature for a query.
Expand Down
23 changes: 7 additions & 16 deletions docs/source/integrations/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,15 +269,6 @@ const server = new ApolloServer({

The `requestDidStart` event fires whenever Apollo Server begins fulfilling a GraphQL request.

```typescript
requestDidStart?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'request' | 'context' | 'logger'
>
): GraphQLRequestListener<TContext> | void;
```

This function can optionally return an object that includes functions for responding
to request lifecycle events that might follow `requestDidStart`.

Expand Down Expand Up @@ -327,7 +318,7 @@ does not occur.
parsingDidStart?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'metrics' | 'source' | 'logger'
'metrics' | 'source'
>,
): (err?: Error) => void | void;
```
Expand All @@ -347,7 +338,7 @@ available at this stage, because parsing must succeed for validation to occur.
validationDidStart?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'metrics' | 'source' | 'document' | 'logger'
'metrics' | 'source' | 'document'
>,
): (err?: ReadonlyArray<Error>) => void | void;
```
Expand All @@ -364,7 +355,7 @@ both the `operationName` string and `operation` AST are available.
didResolveOperation?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'metrics' | 'source' | 'document' | 'operationName' | 'operation' | 'logger'
'metrics' | 'source' | 'document' | 'operationName' | 'operation'
>,
): ValueOrPromise<void>;
```
Expand All @@ -380,7 +371,7 @@ are invoked in series, and the first non-null response is used.
responseForOperation?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'metrics' | 'source' | 'document' | 'operationName' | 'operation' | 'logger'
'metrics' | 'source' | 'document' | 'operationName' | 'operation'
>,
): ValueOrPromise<GraphQLResponse | null>;
```
Expand All @@ -394,7 +385,7 @@ GraphQL operation specified by a request's `document` AST.
executionDidStart?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'metrics' | 'source' | 'document' | 'operationName' | 'operation' | 'logger'
'metrics' | 'source' | 'document' | 'operationName' | 'operation'
>,
): (err?: Error) => void | void;
```
Expand All @@ -408,7 +399,7 @@ parsing, validating, or executing a GraphQL operation.
didEncounterErrors?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'metrics' | 'source' | 'errors' | 'logger'
'metrics' | 'source' | 'errors'
>,
): ValueOrPromise<void>;
```
Expand All @@ -423,7 +414,7 @@ if the GraphQL operation encounters one or more errors.
willSendResponse?(
requestContext: WithRequired<
GraphQLRequestContext<TContext>,
'metrics' | 'response' | 'logger'
'metrics' | 'response'
>,
): ValueOrPromise<void>;
```
Loading

0 comments on commit 22286e4

Please sign in to comment.