apollo-server/packages/apollo-server-integration-testsuite
C.J. Winslow 84bc8346cc
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-10-10 19:25:37 +03:00
..
src Pass the context request and response extension methods (#1547) 2018-10-10 19:25:37 +03:00
.npmignore include readme for npm packages 2017-10-23 15:13:31 -07:00
package.json Switch to tsc --build and remove run scripts from packages 2018-10-05 17:48:34 +02:00
tsconfig.json Remove jest types from tsconfig.base and add it to test configs 2018-10-09 12:02:11 +02:00