apollo-server/packages/apollo-engine-reporting
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 Import graphql-extensions+apollo-engine-reporting/no global apollo-server-env (#1259) 2018-06-27 16:29:00 -07:00
CHANGELOG.md Import graphql-extensions+apollo-engine-reporting/no global apollo-server-env (#1259) 2018-06-27 16:29:00 -07:00
package.json Publish 2018-09-05 17:33:16 +02:00
README.md Import engine reporting protobuf and fix reporting readme (#1429) 2018-07-26 17:39:11 -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
tslint.json Import graphql-extensions+apollo-engine-reporting/no global apollo-server-env (#1259) 2018-06-27 16:29:00 -07:00

apollo-engine-reporting

npm version Build Status

This package is a pure JS implementation of the Apollo Engine reporting feature. It enables aggregated reporting in stateful environments and sending single reports for stateless environments.