apollo-server/packages/apollo-server-core
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
..
src Pass the context request and response extension methods (#1547) 2018-09-07 18:10:30 -07:00
.npmignore include readme for npm packages 2017-10-23 15:13:31 -07:00
CHANGELOG.md Apollo Server 2:Automatic Persisted Queries (#1149) 2018-06-11 15:44:20 -07:00
package.json Publish 2018-09-05 17:33:16 +02:00
README.md fix README badge links and test imports (#1281) 2018-07-03 10:32:02 -07:00
tsconfig.json Use strict top-level tsconfig and fix type issues or override per-package 2018-08-11 16:45:03 +02:00

apollo-server-core

npm version Build Status

This is the core module of the Apollo community GraphQL Server. Read the docs. Read the CHANGELOG.