apollo-server/packages
C.J. Winslow 408198e5ac Pass the context request and response extension methods (#1547)
* Pass the context along to all the extension methods

Addresses #1343 

With this change you should now be able to implement an extension like so:

```javascript
class MyErrorTrackingExtension extends GraphQLExtension {
    willSendResponse(o) {
        const { context, graphqlResponse } = o

        context.trackErrors(graphqlResponse.errors)

        return o
    }
}
```

Edit by @evans :
fixes #1343
fixes #614 as the request object can be taken from context or from requestDidStart
fixes #631 ""

* Remove context from extra extension functions

The context shouldn't be necessary for format, parse, validation, and
execute. Format generally outputs the state of the extension. Parse and
validate don't depend on the context. Execution includes the context
argument as contextValue

* Move change entry under vNext
2018-09-07 18:10:30 -07:00
..
apollo-cache-control Publish 2018-09-03 15:06:00 +02:00
apollo-datasource Publish 2018-09-03 15:06:00 +02:00
apollo-datasource-rest Publish 2018-09-03 15:06:00 +02:00
apollo-engine-reporting Pass the context request and response extension methods (#1547) 2018-09-07 18:10:30 -07:00
apollo-engine-reporting-protobuf Publish 2018-08-14 11:49:10 -07:00
apollo-server Publish 2018-09-05 17:33:16 +02:00
apollo-server-cache-memcached Publish 2018-09-03 15:06:00 +02:00
apollo-server-cache-redis Publish 2018-09-03 15:06:00 +02:00
apollo-server-caching Publish 2018-08-14 11:49:10 -07:00
apollo-server-cloud-function Publish 2018-09-05 17:33:16 +02:00
apollo-server-cloudflare Publish 2018-09-05 17:33:16 +02:00
apollo-server-core Pass the context request and response extension methods (#1547) 2018-09-07 18:10:30 -07:00
apollo-server-env Publish 2018-09-03 15:06:00 +02:00
apollo-server-errors Publish 2018-08-14 11:49:10 -07:00
apollo-server-express Publish 2018-09-05 17:33:16 +02:00
apollo-server-hapi Publish 2018-09-05 17:33:16 +02:00
apollo-server-integration-testsuite Pass the context request and response extension methods (#1547) 2018-09-07 18:10:30 -07:00
apollo-server-koa Publish 2018-09-05 17:33:16 +02:00
apollo-server-lambda Publish 2018-09-05 17:33:16 +02:00
apollo-server-micro Publish 2018-09-05 17:33:16 +02:00
apollo-tracing Publish 2018-09-03 15:06:00 +02:00
graphql-extensions Pass the context request and response extension methods (#1547) 2018-09-07 18:10:30 -07:00